mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
fix notif modal close
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user