Skip to content

Fix OverlaySheet closing when clicking inside layout

Ismael Asensio requested to merge work/overlaysheet_close into master

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.

By setting the checked area to contentLayout instead, the condition respects the limits of the visible card. Clicking outside of this area still closes the sheet as expected.

BUG: 421848 FIXED-IN: 5.72

TEST: testOverlayList.qml or on the gallery examples

Sorry about the trailing whitespaces removal in the code. I have set that up automatically in kate/kdevelop. I can manually restore them, but I think it does not harm.

Merge request reports

Loading