mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04: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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,10 @@ Rectangle {
|
||||
textInput.cut();
|
||||
}
|
||||
|
||||
function clearFocus() {
|
||||
textInput.focus = false;
|
||||
}
|
||||
|
||||
// Default styling
|
||||
width: 200
|
||||
height: 48
|
||||
|
||||
Reference in New Issue
Block a user