I'm pretty sure that VE has always allowed me to paste in a URL, then hit space or enter with the cursor at the end, and it would convert the text to be a link. About a week ago, that stopped working. It is quite painful when pasting in meeting notes, and as a result I'm going to end up leaving a lot of URLs as plain text rather than linkifying them.
Description
Related Objects
- Mentioned In
- T162291: Autolinking for URLs and magic links (ISBN etc.) not applied when copy-pasting a block of text
- Mentioned Here
- T162291: Autolinking for URLs and magic links (ISBN etc.) not applied when copy-pasting a block of text
T117165: Sometimes user-inserted ISBNs don't get converted to magic links somehow, meaning Parsoid has to nowiki them…
Event Timeline
For me, pasted URLs are immediately linkified when I press Ctrl+V (just tested on Chrome and Firefox on Windows 10). Can you provide more details about your browser and a specific page and URL with which this happens? It's possible that some of my recent commits related to T117165 caused some unwanted changes. Note also that typing an URL and pasting an URL is handled differently internally, for boring reasons.
@matmarex : Thanks for the reply.
I have noticed that in the past, some of the URLs that I paste in get linkified, and others don't. I have never noticed a pattern, nor hunted for one. If you could fix the paste issue, that would be great, since it has never worked reliably for me. But I'm more concerned about the space bar problem, because it seems like a recent regression.
I'm using Firefox 52.0.2 on Ubuntu (a recent version). I recently created this page: https://www.mediawiki.org/wiki/Wikimedia_Discovery/Meetings/Search_retrospective_2017-03-28
The whole thing was pasted in as a single block of text. You'll notice the http://retrospectivewiki.org/index.php?title=Tiny_Retrospective URL, which was not linkified by paste, nor can I linkify it by putting the cursor just after the "e" and hitting space or enter.
This was fixed by Bartosz in https://gerrit.wikimedia.org/r/345233 which is part of wmf.19.
We didn't actually enable execution after paste for the core autolink sequence, only for the MW magic link autolink ones… I didn't do that because I was under the impression that pasting itself does that. But apparently it sometimes doesn't?
Yeah, that is yet another case.
The autolinking on paste works when you copy-paste something like "http://example.com/" (just the URL). It does not work when you copy-paste something like "Foo http://example.com/ bar" (anything in addition to the URL). It has always been this way, I don't know if we have a task for it.
As a new workaround, instead of typing a space afterwards, you can backspace over the last character and retype it.
After thinking about this for a while:
- The described behavior (not autolinking if you type a space afterwards) is intentional. That only worked by accident. But if you need a similar workaround, you can now instead delete and retype the last character of the URL/ISBN/etc.
- Instead, I filed T162291: Autolinking for URLs and magic links (ISBN etc.) not applied when copy-pasting a block of text to describe the underlying problem. (I don't like reusing tasks, changing the original description often makes subsequent comments very confusing.)
I'm sorry to hear that restoring the "space/enter linkifies a URL" feature is being declined. It was extremely handy, and worked exactly like Libre Office and Google docs. Not having it really feels like something is missing.
Is it worth re-opening this as a feature request, rather than a bug report?