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.