Page MenuHomePhabricator

Primary selection definitely replaces clipboard content while trying to paste it
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Start a comment/new topic with DiscussionTools in a Linux X system.
  • Copy some text in clipboard (Ctrl+C).
  • Select some text, this is primary selection.
  • Paste the primary selection (mouse middle-click).
  • Try to paste the clipboard (Ctrl+V).
  • Bonus:
    • Open a new browser tab, visit any page and copy any text into your clipboard (Ctrl+C).
    • Go back to wiki discussion tab.
    • Try to paste clipboard (Ctrl+V)

What happens?:
Ctrl+V pastes the primary selection.

Bonus: it still pastes the primary selection. “DiscussionTool local clipboard” only updates if you exit focus from comment area before copying (Ctrl+C)).

What should have happened instead?:
Primary selection and clipboard must remain distinct. Pasting one should not remove access to the other one.

Other information:
Tested with Firefox and Chromium, on Debian GNU/Linux.

Probably related issue: T302147, even if does happen in Windows, not Linux, I think this is a clipboard synchronization issue.

Event Timeline

Possibly related to the recent changes to improve middle-click pasting in visual editor (https://gerrit.wikimedia.org/r/q/topic:middle-click-paste).

Change 826834 had a related patch set uploaded (by Esanders; author: Esanders):

[VisualEditor/VisualEditor@master] ve.ce.Surface: Fix scope typo in middle-click paste handling

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

Change 826834 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] ve.ce.Surface: Fix scope typo in middle-click paste handling

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

Change 828085 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (059f7d91d)

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

Change 828085 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (059f7d91d)

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

@Pols12 , this should work fine now. Kindly check to confirm on your end.

There is still a cursor-location issue, but I’m not sure this is related, so I’m opening a new task.

Thank you for the fix!