Page MenuHomePhabricator

NWE: Copying tab/newline characters using mouse only (on unixoid systems) doesn't work as expected
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Use a system that allows copy and paste by using the mouse only, i.e. you select text with the mouse and paste it using the middle button.
  2. Edit a page with a tab character in NWE.
  3. Select the line with the tab character and the following line.
  4. Paste it into a text document using the middle button.

Expected: The tab character is copied as tab, the newline as one linebreak (like Ctrl-C, Ctrl-V does).
Actual: The tab character is copied as arrow, the newline as two linebreaks.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF changed the task status from Open to Stalled.Feb 14 2017, 8:04 PM
Jdforrester-WMF subscribed.

Does middle-click-to-copy work in non-special-character selections? Does it work in the visual edit mode?

Using this way to copy just normal text works as expected. In visual mode you get empty lines between paragraphs you copy (just like you get empty lines in source code mode), but there these empty lines are IMHO expected and wanted.

Jdforrester-WMF changed the task status from Stalled to Open.Mar 25 2017, 1:58 AM
Jdforrester-WMF triaged this task as Medium priority.
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.

The issue here is that middle-click clone only triggers a paste event, and not a copy event, so the data is written to the clipboard from the CE selection, and not by our special copy handling code. This issue affects visual mode too, in that all formatting is lost.

Change 549087 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Properly support middle click paste

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

Change 549087 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Properly support middle click paste

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

Change 549096 had a related patch set uploaded (by Jforrester; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (2d0f0ec1f)

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

Change 549096 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (2d0f0ec1f)

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

This only fixes pastes inside VE, not into external applications, does it? And these are probably not fixable at all?

Ryasmeen subscribed.

This only fixes pastes inside VE, not into external applications, does it? And these are probably not fixable at all?

Infact, I am seeing the opposite, when I copy paste a line with the tab character and the following line from NWE to any other external text document it is pasting correctly "The tab character is copied as tab, the newline as one linebreak".
But when I paste them in VE it pastes tab character as arrow.

Screen Shot 2019-12-02 at 2.57.16 PM.png (510×1 px, 79 KB)

JTannerWMF subscribed.

During Board Refinement @Esanders said he would revisit what @Ryasmeen discovered here

JTannerWMF added subscribers: dchan, matmarex.

Hey if @Esanders can't do this can one of the other Engineers do it ? @dchan or @matmarex

matmarex lowered the priority of this task from Medium to Low.Feb 20 2020, 6:21 PM
matmarex raised the priority of this task from Low to Medium.

A tab appearing as an arrow in VE mode is correct, so it sounds like everything is working correctly now.

marcella awarded a token.