Bug 435523 - Clicking on darkened area no longer closes OverlaySheet
Summary: Clicking on darkened area no longer closes OverlaySheet
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.80.0
Platform: Other Linux
: VHI normal (vote)
Target Milestone: Not decided
Assignee: David Edmundson
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-04-08 19:02 UTC by Nate Graham
Modified: 2021-04-19 14:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.82


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-04-08 19:02:48 UTC
This used to work, but now it no longer does. You can only close the OverlaySheet by clicking on the close button or hitting the Escape key.

Reproducible in Discover and Kirigami Gallery.
Comment 1 Nate Graham 2021-04-08 19:07:06 UTC
git bisect says this was broken by https://invent.kde.org/frameworks/kirigami/-/commit/21de2a2912839a7076623910025ff88c5cc31c2e.
Comment 2 Nate Graham 2021-04-08 19:08:43 UTC
Marking as VHI since this breaks OverlaySheet quite terribly on mobile, where there is usually no close button and and no Esc key, so the expected way to close it tapping on the background, which no longer working.
Comment 3 David Edmundson 2021-04-15 15:32:34 UTC
got it.

the old code was:

        MouseArea{
            drag.filterChildren: true


filterchilren obviously only works if the other code was a child.
Comment 4 Bug Janitor Service 2021-04-15 15:38:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/279
Comment 5 Nate Graham 2021-04-19 14:22:43 UTC
Git commit e058f44960ba90b016a4c7238cb025e1928256e1 by Nate Graham, on behalf of David Edmundson.
Committed on 19/04/2021 at 14:21.
Pushed by ngraham into branch 'master'.

[OverlaySheet] Fix click to close

In 21de2a2912839a7076623910025ff88c5cc31c2e. the main item was changed
from a MouseArea to a FocusScope.

Moving the MouseArea to be a child doesn't work breaks the fact that it
filters the drag children.

This patch wraps the MouseArea round all the main contents again.

M  +325  -324  src/controls/templates/OverlaySheet.qml
A  +54   -0    tests/OverlayFocusTest.qml     [License: LGPL(v2.0+)]

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