From 0b4346ecd4c6677f18f468ccd4191ff0f2f68fc0 Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 6 Jul 2026 14:15:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20=E8=AF=AD=E8=A8=80=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=B1=95=E5=BC=80=E6=97=B6=20Enter=20=E4=B8=8D?= =?UTF-8?q?=E8=AF=AF=E8=A7=A6=E5=8F=91=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 下拉展开时 Enter 用于确认选项,不应触发插入。 + // (HTMLSelectElement.open 在浏览器存在,但 TS lib.dom 未声明,需断言。) + if ((langSelect as HTMLSelectElement & { open: boolean }).open) return; const tag = (document.activeElement?.tagName ?? '').toLowerCase(); if (tag === 'input' || tag === 'select') { e.preventDefault();