launcher: auto grab focus + clear on close

This commit is contained in:
2 * r + 2 * t 2025-05-02 22:37:14 +10:00
parent 1ec02cb54e
commit b2e2ed2ac5

View file

@ -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
}