Page MenuHomePhabricator

Selected text is not replaced in new wikitext editor when a paste gets transformed
Closed, ResolvedPublic1 Story Points

Description

Steps to reproduce:

  • open something for editing in NWE
  • copy an URL to the clipboard
  • select some text in the edit window
  • press Ctrl-V to paste

Expected result: selected text is removed, the URL (or a corresponding internal link wikitext) is inserted in its place
Actual result: The URL (or transformed wikitext) is inserted after the selected text.

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterUpdate VE core submodule to master (139bdf7)
VisualEditor/VisualEditor : masterOverwrite selected content when pasting via DataTransferItem

Event Timeline

Tgr created this task.Dec 23 2016, 11:12 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 23 2016, 11:12 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I dug into this a bit, it looks like ve.ce.Surface.prototype.handleDataTransferItems always collapses to end. @Esanders?

Jdforrester-WMF triaged this task as High priority.Jan 6 2017, 12:52 AM
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 1.

Change 334681 had a related patch set uploaded (by Esanders):
Overwrite selected content when pasting via DataTransferItem

https://gerrit.wikimedia.org/r/334681

Jdforrester-WMF closed this task as Resolved.Jan 29 2017, 6:02 PM
Jdforrester-WMF assigned this task to Esanders.

Change 334681 merged by jenkins-bot:
Overwrite selected content when pasting via DataTransferItem

https://gerrit.wikimedia.org/r/334681

Change 334906 had a related patch set uploaded (by Jforrester):
Update VE core submodule to master (139bdf7)

https://gerrit.wikimedia.org/r/334906

Change 309472 had a related patch set uploaded (by Jforrester):
Update VE core submodule to master (139bdf7)

https://gerrit.wikimedia.org/r/309472

Change 309472 merged by jenkins-bot:
Update VE core submodule to master (139bdf7)

https://gerrit.wikimedia.org/r/309472

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

This is now fixed in master.

In this edit, I selected the contents of the section and pasted a single-line URL over the whole thing (at 19:47 on Tuesday/four hours after the latest version was deployed).

The old URL was replaced by the new URL, but the rest of the contents stayed in place. Is that behavior still fixed-in-a-future-release, or was the fix only partial?

It doesn't look like the code has been deployed yet to MW.