From 1a25472b437f07e4221dcac707745cc3444d86b2 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Thu, 29 Oct 2026 16:17:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=96=E8=BE=91=E8=83=BD=E5=8A=9B):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2=E7=84=A6=E7=82=B9=E6=8A=A2?= =?UTF-8?q?=E5=8D=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/webui/ofdgo.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/webui/ofdgo.js b/assets/webui/ofdgo.js index e31a8bc..9906b24 100644 --- a/assets/webui/ofdgo.js +++ b/assets/webui/ofdgo.js @@ -11065,7 +11065,13 @@ function copySelection(event) { event.preventDefault(); } -function focusSearch() { +async function focusSearch() { + if (canvasEditor.input || canvasEditor.crop || canvasEditor.nudge || canvasEditor.nudgeCommit) { + const tab = documentTab(), content = documentContentKey(state); + const current = () => isForegroundDocument(tab) && content === documentContentKey(state); + if (!await canvasEditor.commitNudge() || !current() || !await canvasEditor.commitText() || !current() + || !await canvasEditor.commitCrop() || !current() || document.body.hasAttribute("data-busy") || formDialogOpen()) return; + } if (!state.showPages) { toggleSidebar("pages"); }