STEPS TO REPRODUCE 1. Set the focus on the search field 2. Delete all text in the search field 3. Press Del OBSERVED RESULT The selected history item is deleted EXPECTED RESULT Nothing happens. SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.23.80 KDE Frameworks Version: 5.91.0 Qt Version: 5.15.3 Graphics Platform: X11
Besides, it's unexpected that pressing Del removes the selected item, while the focus is in the search field
I looked into the code and found that the behavior is intended. The search field always has focus so it's the only way to make it possible to use Del to delete an clipboard item in the list.
(In reply to Fushan Wen from comment #2) > that the behavior is intended I know it's intended, but IMO this behavior is very unexpected.
When there is no highlight, pressing Del will not do anything, so https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1376 may fix the unexpected behavior.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1381
Git commit 79344a3b26eaaa2d766b0e6b5d5a8d61193bd049 by Fushan Wen. Committed on 20/01/2022 at 09:47. Pushed by fusionfuture into branch 'master'. applets/clipboard: Don't delete any item when the search field has focus The behavior may cause unexpected results when the user spam press Del in order to delete all characters in the search field, and find that all items in the list are deleted. It also causes pressing Del in the search field not deleting the fully selected text. Related: bug 448738 M +0 -12 applets/clipboard/contents/ui/ClipboardPage.qml https://invent.kde.org/plasma/plasma-workspace/commit/79344a3b26eaaa2d766b0e6b5d5a8d61193bd049
Git commit 6ac38d9c493c1720834e5f587f60dfcdd14d9646 by Fushan Wen. Committed on 20/01/2022 at 12:33. Pushed by fusionfuture into branch 'Plasma/5.24'. applets/clipboard: Don't delete any item when the search field has focus The behavior may cause unexpected results when the user spam press Del in order to delete all characters in the search field, and find that all items in the list are deleted. It also causes pressing Del in the search field not deleting the fully selected text. Related: bug 448738 (cherry picked from commit 79344a3b26eaaa2d766b0e6b5d5a8d61193bd049) M +0 -12 applets/clipboard/contents/ui/ClipboardPage.qml https://invent.kde.org/plasma/plasma-workspace/commit/6ac38d9c493c1720834e5f587f60dfcdd14d9646