launcher: auto grab focus + clear on close
This commit is contained in:
parent
1ec02cb54e
commit
b2e2ed2ac5
1 changed files with 7 additions and 1 deletions
|
|
@ -131,7 +131,13 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: key press grab focus + close on esc anywhere
|
||||
onVisibleChanged: {
|
||||
if (visible)
|
||||
forceActiveFocus();
|
||||
else
|
||||
text = "";
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: root.launcher.launcherVisible = false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue