mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
fix clipboard text focus
This commit is contained in:
@@ -47,6 +47,19 @@ DankModal {
|
||||
clipboardHistoryModal.visible = true
|
||||
initializeThumbnailSystem()
|
||||
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() {
|
||||
@@ -386,18 +399,6 @@ DankModal {
|
||||
clipboardHistoryModal.searchText = text
|
||||
updateFilteredModel()
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onVisibleChanged() {
|
||||
if (clipboardHistoryModal.visible) {
|
||||
Qt.callLater(function () {
|
||||
searchField.forceActiveFocus()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
target: clipboardHistoryModal
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
||||
Reference in New Issue
Block a user