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