1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

modals: more focus fixes

This commit is contained in:
bbedward
2025-11-10 09:40:28 -05:00
parent 7b3d2ab85a
commit af95631a1d
3 changed files with 34 additions and 41 deletions

View File

@@ -122,6 +122,17 @@ DankModal {
refreshPlugins()
}
Connections {
target: contentLoader
function onLoaded() {
Qt.callLater(() => {
if (contentLoader.item && contentLoader.item.searchField) {
contentLoader.item.searchField.forceActiveFocus()
}
})
}
}
onDialogClosed: () => {
allPlugins = []
searchQuery = ""
@@ -143,6 +154,10 @@ DankModal {
anchors.fill: parent
focus: true
Component.onCompleted: {
browserSearchField.forceActiveFocus()
}
Keys.onPressed: event => {
if (event.key === Qt.Key_Escape) {
root.close()