Page MenuHomePhabricator

Visual Editor no longer converts a URL to be a link when you hit space or enter
Closed, DeclinedPublic1 Estimated Story Points

Description

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.

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.

Jdforrester-WMF assigned this task to matmarex.
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF subscribed.

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?

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.

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:

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?