Page MenuHomePhabricator

After having pasted primary selection, clipboard content is prepend at the surface start instead of at cursor position
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue:

  • Open new comment/new topic tool (DiscussionTools) in a Linux X system (don’t type anything for now).
  • Click on “Visual” tab to switch to visual mode (in case you were in source mode).
  • Copy some text in clipboard (Ctrl+C).
  • Select some text, this is primary selection.
  • Do not click on the surface (i.e. do not give it focus for now). Instead, directly paste the primary selection (mouse middle-click): the surface now only contains what you had selected. It also gets focus: a caret blinks after the inserted text.
  • Optional: Type "abc": "abc" is well appended right after content you’ve pasted. You can also move the cursor and type other text somewhere else.
  • Paste the clipboard (Ctrl+V).

What happens?:
Clipboard content is pasted at the start of the surface (before what you have already pasted and typed).

What should have happened instead?:
Clipboard content should be added where your cursor is located.

Other information:
Follow-up of T316054: Primary selection definitely replaces clipboard content while trying to paste it.
Same issue on Firefox and Chromium.

Event Timeline

I can't reproduce this in Chrome or FF. It works fine in both in production and beta.

Mmm… Strange. I work on Debian stable, with LXQt desktop environment.

I can’t reproduce anymore. That was probably an issue in my local environment.

Pols12 reopened this task as Open.EditedJan 26 2024, 9:05 PM

Actually, I am still able to reproduce the issue. Note you need to ensure you are in Visual mode, this works properly in source mode. I missed to provide this piece of information in reproduction steps.

Instead of pasting primary selection, you may also drag and drop some text to reproduce this issue.