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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user