diff --git a/qml/AppUI/FullScreenUI.qml b/qml/AppUI/FullScreenUI.qml index 3428954..21e0156 100644 --- a/qml/AppUI/FullScreenUI.qml +++ b/qml/AppUI/FullScreenUI.qml @@ -22,6 +22,9 @@ FocusScope { function forceFocus() { fullScreenUI.focus = true; + if (mainWindow.visible) { + searchInputBar.textInputFocus(); + } } Item { diff --git a/qml/AppUI/NormalUI.qml b/qml/AppUI/NormalUI.qml index 9ccf95a..5b2f38c 100644 --- a/qml/AppUI/NormalUI.qml +++ b/qml/AppUI/NormalUI.qml @@ -17,6 +17,9 @@ FocusScope { function forceFocus() { normalUI.focus = true; + if (mainWindow.visible) { + appPage.search.changeToSearch(""); + } } function keyPressed(event) { // 任意字符键焦点切换到搜索(0-9 a-z)