1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-11 07:52: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

@@ -149,9 +149,6 @@ PanelWindow {
searchField.enabled = true;
searchDebounceTimer.stop(); // Stop any pending search
updateFilteredModel();
Qt.callLater(function() {
searchField.forceActiveFocus();
});
}
function hide() {
@@ -461,6 +458,17 @@ PanelWindow {
onTextEdited: {
searchDebounceTimer.restart();
}
Connections {
target: launcher
function onVisibleChanged() {
if (launcher.visible) {
searchField.forceActiveFocus();
} else {
searchField.clearFocus();
}
}
}
Keys.onPressed: function(event) {
if ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && filteredModel.count && text.length > 0) {
// Launch first app when typing in search field