Bug 436166 - Keyboard navigation and mouse over both move current index
Summary: Keyboard navigation and mouse over both move current index
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-04-25 14:15 UTC by David Edmundson
Modified: 2021-08-24 15:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2021-04-25 14:15:34 UTC
If I have a list with 10 entries and I select item 5 by clicking (so it gets the dark blue selected)

Then hover item 2.

If I press down, on a widgets app I would move the selection to item 6.

In plasma-system monitor we move selection to item 3 which is unexpected
Comment 1 Bug Janitor Service 2021-08-23 15:15:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/160
Comment 2 David Edmundson 2021-08-24 14:03:32 UTC
Git commit 7d6bdd008652ec5103339da4506fbbf3115a2ef3 by David Edmundson.
Committed on 24/08/2021 at 14:03.
Pushed by davidedmundson into branch 'master'.

Introduce concept of hoveredIndex

Rather than abusing the currentIndex for tracking hover introduce a new
row property. This brings it more in line with the QItemView on widgets.

This fixes an issue where keyboard navigation would be relative to the
mouse, not the last keyboard selected index.

This does mean we have to update the current index explicitly when a
click action occurs.

M  +10   -18   src/table/BaseCellDelegate.qml
M  +1    -0    src/table/BaseTableView.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/7d6bdd008652ec5103339da4506fbbf3115a2ef3