Bug 421848 - [kcm/kwinrules] OverlaySheet closes when clicking on the scrollbar
Summary: [kcm/kwinrules] OverlaySheet closes when clicking on the scrollbar
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.71.0
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-21 02:14 UTC by Duncan
Modified: 2020-06-15 15:15 UTC (History)
4 users (show)

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


Attachments
QML test sample to reproduce the bug (579 bytes, text/x-qml)
2020-06-13 10:55 UTC, Ismael Asensio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2020-05-21 02:14:25 UTC
+++ This bug was initially created as a clone of Bug #421540 +++
[Frameworks/plasma git-master, so this is the redesigned window rules kcm.  qt-5.15.0_rc ]

Yet another bug with the new rules KCM: Clicking the Select Properties list scrollbar kills the list!  To reproduce:

1. Add a new rule.
2. Hit Add Properties.
3. Assuming the list of properties is long enough to get a scrollbar (it's a long list so that's fairly likely), click it to scroll down.

The list of properties vanishes instead of scrolling and staying viewable.

Watching closely it does appear that the list scrolls before it disappears.  Or at least the scrollbar position, the part I can catch the redraw on before it disappears, does.

Using the scrollwheel instead of clicking the scrollbar scrolls as it should.
Comment 1 Nate Graham 2020-06-10 21:34:57 UTC
You don't need to clone bugs; just file new ones.

This is a Kirigami bug that was fixed in Frameworks 5.71 IIRC.
Comment 2 Ismael Asensio 2020-06-10 22:23:49 UTC
It seems to be still happening for me with on master.
So I'll reopen it and move it to the kirigami product.
Please, correct me if I'm testing it wrong.
Comment 3 Nate Graham 2020-06-10 22:38:01 UTC
Hmm, you're still seeing it? I tested before writing the command and it was working for me. As you using Kirigmai from git master?
Comment 4 Duncan 2020-06-12 14:01:50 UTC
(In reply to Nate Graham from comment #3)
> Hmm, you're still seeing it? I tested before writing the command and it was
> working for me. As you using Kirigmai from git master?

Just updated.  Still seeing it here, as of kirigami commit 540d05adf60f5bbc5f907b78a51ca276707e063e.

Just to be sure you're in the right place to test as sometimes I forget and think its fixed when I'm working with the main window rules list which works fine (and comes first), not the add-properties list, which is where the bug occurs:  Window rules, editing a rule, add properties.  Ensure the window is short enough that the list of properties has a scrollbar (lots of properties so a scrollbar's likely), and click it to scroll.  Here, the add-properties list disappears instead of scrolling down.  Using the scrollwheel scrolls (and is the workaround I'm using, except I often forget and have to click add-properties again), but clicking the scrollbar disappears the list.

Else maybe it's qt-version-related or something?  Now qt 5.15.0 here (upgraded from the rc I was on at the original report).
Comment 5 Nate Graham 2020-06-13 02:08:14 UTC
Ah, I can confirm that clicking on the srollbar closes the sheet. That's not a Kirigami bug AFAIK, as it doesn't happen with a scrollable sheet in Discover.
Comment 6 Ismael Asensio 2020-06-13 10:55:52 UTC
Created attachment 129303 [details]
QML test sample to reproduce the bug

I disagree. I can reproduce it on the attached snippet
Comment 7 Ismael Asensio 2020-06-13 12:50:19 UTC
Moving it back to kirigami, since I think this could fix it :D:
Proposed patch: https://invent.kde.org/frameworks/kirigami/-/merge_requests/26
Comment 8 Duncan 2020-06-13 14:56:14 UTC
(In reply to Ismael Asensio from comment #7)
> Moving it back to kirigami, since I think this could fix it :D:
> Proposed patch:
> https://invent.kde.org/frameworks/kirigami/-/merge_requests/26

Applying that does fix it here, yes. 

(Like feeling good after being sick I never appreciated an actually working scrollbar so much! =:^)
Comment 9 Nate Graham 2020-06-15 15:15:44 UTC
Git commit bace64a0965f3769b21953d398b639443c4708af by Nate Graham, on behalf of Ismael Asensio.
Committed on 15/06/2020 at 15:15.
Pushed by ngraham into branch 'master'.

Fix OverlaySheet closing when clicking inside layout

The `OverlaySheet` would close when clicking outside `scrollview.contentIem`.
This area doesn't include the scrollbar area, nor header or footer items, so clicking on those items,
if they do not catch the click event first, would result in an undesired closure of the sheet.

Setting the condition to check for `contentLayout` instead respect the limits of the visible card.
Clicking outside of this area still closes the sheet as expected.
FIXED-IN: 5.72

M  +5    -5    src/controls/templates/OverlaySheet.qml

https://invent.kde.org/frameworks/kirigami/commit/bace64a0965f3769b21953d398b639443c4708af