From a195b7ead7c6664e0138f99a58b67f6800fb681f Mon Sep 17 00:00:00 2001 From: viarotel Date: Wed, 15 May 2024 11:56:56 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E2=99=BB=EF=B8=8F=20Search=20interacti?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/exposes/search/index.js | 5 +++++ src/components/AppSearch/index.vue | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/electron/exposes/search/index.js b/electron/exposes/search/index.js index e68c5cc..f39e9eb 100644 --- a/electron/exposes/search/index.js +++ b/electron/exposes/search/index.js @@ -16,9 +16,12 @@ export default () => { } function close() { + remote.getCurrentWebContents().stopFindInPage('clearSelection') + if (!findInPage) { return false } + return findInPage.closeFindWindow() } @@ -62,6 +65,8 @@ export default () => { : {}), }) + console.log('findInPage', findInPage) + return findInPage } diff --git a/src/components/AppSearch/index.vue b/src/components/AppSearch/index.vue index be95168..474e94d 100644 --- a/src/components/AppSearch/index.vue +++ b/src/components/AppSearch/index.vue @@ -15,7 +15,7 @@