Page MenuHomePhabricator

Selected text is not replaced in new wikitext editor when a paste gets transformed
Closed, ResolvedPublic1 Estimated 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.

Event Timeline

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 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

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

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.