1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 07:22: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

@@ -15,7 +15,6 @@ DankModal {
property var clipboardEntries: []
property string searchText: ""
property bool shouldFocusSearch: false
function updateFilteredModel() {
filteredClipboardModel.clear();
@@ -118,13 +117,6 @@ DankModal {
height: 550
keyboardFocus: "ondemand"
onVisibleChanged: {
if (visible) {
refreshClipboard();
shouldFocusSearch = true;
}
}
onBackgroundClicked: {
hide();
}
@@ -198,14 +190,14 @@ DankModal {
clipboardHistory.searchText = text;
updateFilteredModel();
}
Connections {
target: clipboardHistory
function onOpened() {
if (shouldFocusSearch) {
searchField.forceActiveFocus()
shouldFocusSearch = false
}
searchField.forceActiveFocus();
}
function onDialogClosed() {
searchField.clearFocus();
}
}
}