1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 07:52:50 -05:00

fix notif modal close

This commit is contained in:
bbedward
2025-08-26 23:37:01 -04:00
parent 346e00d395
commit f8b10204f8
2 changed files with 6 additions and 9 deletions

View File

@@ -214,14 +214,8 @@ PanelWindow {
visible: root.visible // Only active when the modal is visible visible: root.visible // Only active when the modal is visible
focus: root.visible focus: root.visible
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
console.log(
"DankModal escape pressed - shouldHaveFocus:",
shouldHaveFocus, "closeOnEscapeKey:",
root.closeOnEscapeKey, "objectName:",
root.objectName || "unnamed")
if (root.closeOnEscapeKey if (root.closeOnEscapeKey
&& shouldHaveFocus) { && shouldHaveFocus) {
console.log("DankModal handling escape")
root.close() root.close()
event.accepted = true event.accepted = true
} }

View File

@@ -16,9 +16,12 @@ DankModal {
height: 700 height: 700
visible: false visible: false
onBackgroundClicked: hide() onBackgroundClicked: hide()
onDialogClosed: { onShouldBeVisibleChanged: (shouldBeVisible) => {
notificationModalOpen = false if (!shouldBeVisible) {
modalKeyboardController.reset() notificationModalOpen = false
modalKeyboardController.reset()
NotificationService.onOverlayClose()
}
} }
modalFocusScope.Keys.onPressed: function (event) { modalFocusScope.Keys.onPressed: function (event) {