Find/Replace on KDE Plasma unnecessarily overwrites clipboard when used with "clipboard selection sync" #197495
Labels
editor-find
Editor find operations
under-discussion
Issue is under discussion for relevance, priority, approach
Does this issue occur when all extensions are disabled?: Yes
Version: 1.85.0-insider
Commit: e550098
Date: 2023-11-03T15:12:10.231Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.2.0-36-generic
Steps to Reproduce:
Ctrl-F
to search for the word under the current cursor. Doing this makes vscode prefill this word into the search box.Observed behavior
The string on the clipboard becomes the prefilled string in the search box.
Expected behavior
The original string on the clipboard is preserved.
This is the expected behavior as when focusing the address bar in Chrome and Firefox with this Klipper option enabled, the text in the address bar is auto-selected (so that it can be cleared automatically when typing a single keystroke into the address bar), but the clipboard contents are unaffected.
Also, in Firefox, one can:
Behavior identical to that described above for Firefox can be observed in LibreOffice Writer 7.3.
I think it is reasonable to expect this behavior in VS Code, as this prevents the clipboard contents from being unintentionally overwritten. It is also the behavior of multiple other major applications.
Note
I originally came across a very similar issue in FreeTubeApp/FreeTube#2019 and FreeTubeApp/FreeTube#4282, which may be relevant. I decided to test the behavior of Visual Studio Code and found this problem in this program too.
I could apparently eliminate the issue there by focusing and selecting the text in the input element asynchronously, but I don't know enough about the much more complex vscode codebase right now so I don't feel like I could open a PR just yet.
The text was updated successfully, but these errors were encountered: