From 78207d4eebb24719c67718981a9f28433f378544 Mon Sep 17 00:00:00 2001 From: youdiansaodongxi Date: Mon, 1 Jul 2024 10:59:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(qml/AppUI):=20=E5=BC=80=E5=A7=8B=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=94=B6=E8=B5=B7=E5=86=8D=E5=B1=95=E5=BC=80=E6=97=B6?= =?UTF-8?q?=E7=84=A6=E7=82=B9=E8=AE=BE=E7=BD=AE=E5=9C=A8=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qml/AppUI/FullScreenUI.qml | 3 +++ qml/AppUI/NormalUI.qml | 3 +++ 2 files changed, 6 insertions(+) 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)