From 80e548f93e81059136b325eebf153570b5d3ac34 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Thu, 29 Oct 2026 14:16:31 +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=E5=B7=A5=E5=85=B7=E6=A0=8F=E6=92=A4=E9=94=80?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/webui/ofdgo.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/webui/ofdgo.js b/assets/webui/ofdgo.js index ce9ac4f..6e40926 100644 --- a/assets/webui/ofdgo.js +++ b/assets/webui/ofdgo.js @@ -1995,7 +1995,9 @@ function handleKeyDown(event) { } } if (event.ctrlKey || event.metaKey) { - if (state.editing && !target.closest("input, textarea, select, [contenteditable]") + const field = target.closest("input, textarea, select, [contenteditable]"); + const editorControl = field && el.editorTools.contains(field) && field.matches('select, input[type="checkbox"], input[type="radio"], input[type="color"], input[type="range"]'); + if (state.editing && (!field || editorControl) && (key.toLowerCase() === "z" || (!event.shiftKey && key.toLowerCase() === "y"))) { event.preventDefault(); (key.toLowerCase() === "y" || event.shiftKey ? el.redoButton : el.undoButton).click();