mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
fix clipboard text focus
This commit is contained in:
@@ -47,6 +47,19 @@ DankModal {
|
|||||||
clipboardHistoryModal.visible = true
|
clipboardHistoryModal.visible = true
|
||||||
initializeThumbnailSystem()
|
initializeThumbnailSystem()
|
||||||
refreshClipboard()
|
refreshClipboard()
|
||||||
|
|
||||||
|
Qt.callLater(function() {
|
||||||
|
if (contentLoader.item) {
|
||||||
|
const content = contentLoader.item
|
||||||
|
if (content.children && content.children.length > 1) {
|
||||||
|
const searchField = content.children[1]
|
||||||
|
if (searchField && searchField.forceActiveFocus) {
|
||||||
|
searchField.text = ""
|
||||||
|
searchField.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
@@ -386,18 +399,6 @@ DankModal {
|
|||||||
clipboardHistoryModal.searchText = text
|
clipboardHistoryModal.searchText = text
|
||||||
updateFilteredModel()
|
updateFilteredModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
function onVisibleChanged() {
|
|
||||||
if (clipboardHistoryModal.visible) {
|
|
||||||
Qt.callLater(function () {
|
|
||||||
searchField.forceActiveFocus()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
target: clipboardHistoryModal
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
Reference in New Issue
Block a user