Bug 491127 - BaseTableView: selection(Model) is cleared when table is left using the tab key
Summary: BaseTableView: selection(Model) is cleared when table is left using the tab key
Status: CONFIRMED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-08-01 14:28 UTC by cwo
Modified: 2024-08-06 14:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cwo 2024-08-01 14:28:27 UTC
SUMMARY

When leaving a BaseTableView table such as the applicationstable or processtable with the tab key, the currently highlighted row stays highlighted, but is no longer selected. The "Quit Application"/"End Process" buttons become disabled, and the Application Details sidebar tells you to "select an application to see its details". When only using the keyboard, sometimes this only seems to happen on the second go around the tab focus chain, but if the row is focused with the mouse it happens immediately on the first try.


STEPS TO REPRODUCE
1. Open System Monitor
2. Click Applications
3. Click one of the entries in the list, verify that "Quit Application" is enabled 
4. Press tab

OBSERVED RESULT

"Quit Application" becomes disabled

EXPECTED RESULT

"Quit Application" stays enabled

SOFTWARE/OS VERSIONS

Operating System: TUXEDO OS 3
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.0
Kernel Version: 6.5.0-10043-tuxedo (64-bit)
Graphics Platform: Wayland

also tested on git master

ADDITIONAL INFORMATION

Putting  `onSelectionChanged: (next, prev)  => console.log(prev, " ->", next)` in the selectionModel shows that the selection in the selection model is cleared when tab is pressed, but I haven't been able to figure out why.
Comment 1 Arjen Hiemstra 2024-08-06 14:06:13 UTC
I'm reasonably sure this is a Qt bug. When trying with a more simple test case, it actually ends up with "Tab" going through the individual table view delegates and there doesn't seem to be a way to escape it, even though the arrow keys also navigate the table. More importantly, if I select something in the table then press Tab a few times to select the table, the first press just moves focus to the table and nothing changes, but the second will move the current index and with that clear the selection.