mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
fix(编辑能力): 修复搜索焦点抢占问题
This commit is contained in:
1 parent
af80fcc9ba
commit
1a25472b43
1 file changed
+7
-1
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user