Bug 500594

Summary: Opening klipper with Meta-V has confusing highlighting and using 'right'-arrow followed by up/down arrow does not move the highlight but scrolls the list
Product: [Plasma] plasmashell Reporter: slartibart70
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: ASSIGNED ---    
Severity: minor CC: nate
Priority: NOR Keywords: usability
Version First Reported In: 6.3.1   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: meta-v

Description slartibart70 2025-02-22 21:12:26 UTC
Open klipper with Meta-V
Next, the search-field is highlighted (allowing us to search for entries) and the cursor blinks in the search box

But, at the same time, the first entry is also highlighted, giving you the impression that this element has focus. 

In this misleading situation, i press right-arrow to access the icons for this 'highlighted' clipboard-entry (to hopefully get to action/qr/edit/remove icons in this highlighted row)

I'm never reaching the icons, instead, the focus switches to the clear-history icon (because the real highlight was in search-box) giving this clear-icon blue edges while retaining the highlight on the first list-item.

I'm still wrongly assuming i work on the highlighted list-item, so if i now press up/down arrow the whole list of clipboard entries is 'paged-down' for some amount of lines (similar to operating the scroll-bar)

This is more than confusing, especially since the systray-klipper behaves differently:
Here, i can never get from the search-box to the clear-history item, instead, i stay in the search-box.
Moreover, if search has focus, none of the list-items are highlighted.
Pressing right-arrow has no effect
Pressing down-arrow  moves the highlight from search-box to the first list-entry.
Now right-arrow selects the list-items own icons, as expected.

There is never a 'scroll-mode' that can be accidentally operated by up/down arrow

I would suggest to 
- fix the highlighting of the popup when opened with Meta-V similar to systray-operation (so we don't have more than one element in focus)
- to restrict right-arrow acting on list-elements only (to get to the entries own icons (action/qr/edit/remove)
Comment 1 slartibart70 2025-02-22 21:18:49 UTC
Created attachment 178750 [details]
meta-v
Comment 2 Bug Janitor Service 2025-02-23 07:17:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5250
Comment 3 cwo 2025-02-24 11:11:58 UTC
Git commit 7a8f7e2401fbeffc86a4f47776e52da17cb3c73e by Christoph Wolk.
Committed on 24/02/2025 at 10:45.
Pushed by cwo into branch 'master'.

klipper: don't scroll on Arrow Down in clear button

Arrow Down from the search bar in the klipper popup moves the
currentIndex and focuses the ListView, but the clear button right next
to it has no special handler for this. The arrow key falls back to the
ScrollView, which scrolls the view by a substantial amount. This breaks
the typical arrow key interaction pattern in the popup and feels rather
confusing.

Instead, handle it the same way as arrow down on the search field. Arrow
Up is left unchanged, as the current behavior on both controls (scolling
the view up) can be useful in case the view is not already positioned at
the top due to other user interaction. Along the way, we make sure that
the view is scrolled to the currentItem when arrowing down from either
control, so that the newly selected item is in the visible area even if
the user scrolled the view manually in between.

M  +9    -0    klipper/declarative/qml/ClipboardMenu.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/7a8f7e2401fbeffc86a4f47776e52da17cb3c73e
Comment 4 Bug Janitor Service 2025-02-25 23:36:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5262