From f8b10204f8ccebc61badb6a5473e243fd7fc47fd Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 26 Aug 2025 23:37:01 -0400 Subject: [PATCH] fix notif modal close --- Modals/DankModal.qml | 6 ------ Modals/NotificationModal.qml | 9 ++++++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Modals/DankModal.qml b/Modals/DankModal.qml index 3690547a..5beb4afd 100644 --- a/Modals/DankModal.qml +++ b/Modals/DankModal.qml @@ -214,14 +214,8 @@ PanelWindow { visible: root.visible // Only active when the modal is visible focus: root.visible Keys.onEscapePressed: event => { - console.log( - "DankModal escape pressed - shouldHaveFocus:", - shouldHaveFocus, "closeOnEscapeKey:", - root.closeOnEscapeKey, "objectName:", - root.objectName || "unnamed") if (root.closeOnEscapeKey && shouldHaveFocus) { - console.log("DankModal handling escape") root.close() event.accepted = true } diff --git a/Modals/NotificationModal.qml b/Modals/NotificationModal.qml index dc4e087d..ac108084 100644 --- a/Modals/NotificationModal.qml +++ b/Modals/NotificationModal.qml @@ -16,9 +16,12 @@ DankModal { height: 700 visible: false onBackgroundClicked: hide() - onDialogClosed: { - notificationModalOpen = false - modalKeyboardController.reset() + onShouldBeVisibleChanged: (shouldBeVisible) => { + if (!shouldBeVisible) { + notificationModalOpen = false + modalKeyboardController.reset() + NotificationService.onOverlayClose() + } } modalFocusScope.Keys.onPressed: function (event) {