Bug 439459

Summary: Pressing the down arrow on the last category in any sidebar causes the vertical alignment to get messed up
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Kishore Gopalakrishnan <kishore96>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: minor CC: aspotashev, nate, plasma-bugs, vjciqw7p
Priority: NOR    
Version: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In: 5.85
Attachments: Screenshot of the broken state

Description Kishore Gopalakrishnan 2021-07-04 04:58:59 UTC
Created attachment 139835 [details]
Screenshot of the broken state

SUMMARY
If the focus is on the last item in a sidebar, pressing the down arrow causes the items to become vertically aligned to the bottom

STEPS TO REPRODUCE
1. Go to System Settings > Workspace > Startup and shutdown
2. Click in the sidebar that shows subcategories, placing the focus on the last item (Desktop session)
3. Press down arrow (keyboard key)

OBSERVED RESULTS
Pressing 'down' when the last item in a sidebar is selected vertically aligns everything to the bottom (see attached screenshot).

EXPECTED RESULTS
Pressing the down arrow in step 3 should do nothing.

SOFTWARE VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.10.47-1-lts (64-bit)

ADDITIONAL INFORMATION
Seems to be a general bug with the sidebar. Also reproducible in Settings > Workspace > Search
Comment 1 Nate Graham 2021-07-30 16:00:00 UTC
lol oops
Comment 2 Nate Graham 2021-07-30 16:03:59 UTC
This appears to be a defect in Kirigami.ScrollablePage. I can reproduce the issue with other UI elements based on it what are not tall enough to be scrollable. Will investigate.
Comment 3 Bug Janitor Service 2021-07-30 16:10:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/344
Comment 4 Aleix Pol 2021-08-02 20:36:28 UTC
Git commit 537e213292cfadb6892a10987cdd9b21df158770 by Aleix Pol Gonzalez, on behalf of Nate Graham.
Committed on 02/08/2021 at 20:34.
Pushed by ngraham into branch 'master'.

[ScrollView] Don't scroll with arrow keys if the view isn't scrollable

Otherwise, a non-scrollable view will oddly teleport its contents to the
bottom when you hit the down arrow key.
FIXED-IN: 5.85

M  +4    -0    src/controls/templates/private/ScrollView.qml

https://invent.kde.org/frameworks/kirigami/commit/537e213292cfadb6892a10987cdd9b21df158770
Comment 5 Nate Graham 2021-08-04 19:34:01 UTC
*** Bug 439993 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-08-17 16:02:57 UTC
*** Bug 441084 has been marked as a duplicate of this bug. ***