1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-26 22:42:50 -05:00

fix auto focusing text fields

This commit is contained in:
bbedward
2025-07-22 23:51:18 -04:00
parent 9c8c25711c
commit e94d2af9ae
6 changed files with 41 additions and 36 deletions

View File

@@ -199,11 +199,14 @@ PanelWindow {
// Keyboard handling
FocusScope {
id: focusScope
anchors.fill: parent
focus: visible && root.closeOnEscapeKey
Keys.onEscapePressed: {
visible: root.visible // Only active when the modal is visible
Keys.onEscapePressed: (event) => {
if (root.closeOnEscapeKey) {
visible = false
root.visible = false;
event.accepted = true;
}
}
}