From 1a81508b5d046732af8fe176fe9c3d6887ed2d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Mon, 17 Apr 2023 10:29:20 +0200 Subject: [PATCH] fix(ActivityCenterPopup): close the AC popup a second time the button is clicked the Popup has to be modal and the overlay should catch/eat all the mouse events to prevent them from propagating to the contents behind the popup Fixes #9838 --- .../activitycenter/popups/ActivityCenterPopup.qml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml b/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml index ca3c106494..028ef19a7d 100644 --- a/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml +++ b/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml @@ -29,14 +29,19 @@ Popup { activityCenterStore.markAsSeenActivityCenterNotifications() } - x: Global.applicationWindow.width - root.width - Style.current.halfPadding width: 560 padding: 0 - modal: false - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + modal: true parent: Overlay.overlay - Overlay.modeless: null + Overlay.modal: MouseArea { // eat every event behind the popup + hoverEnabled: true + onPressed: (event) => { + event.accept() + root.close() + } + onWheel: (event) => event.accept() + } background: Rectangle { color: Style.current.background