дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
fix(keymap): Don't run the Enter that commits an input-method candidate
WebKit sends the Enter (or Space) that commits a candidate after compositionend, with isComposing already false and keyCode 229. Handlers that checked isComposing alone ran it: dialogs confirmed and shortcuts fired while typing Chinese or Japanese. isImeKey() checks both, and every keydown handler that skipped composition uses it.
Цей коміт міститься в:
1 джерело
2c576418cb
коміт
f73c0a6b1d
10 files changed
+26
-9
No files matched your search
@@ -33,6 +33,7 @@ import { closeBreakpointPopover, useOverlays } from "./popoverStore";
|
||||
import { VariablesView, type VarRoot } from "./VariablesView";
|
||||
import { pushHistory, readHistory } from "./expressionHistory";
|
||||
import styles from "./Overlays.module.css";
|
||||
import { isImeKey } from "@/platform/ime";
|
||||
|
||||
export function DebuggerOverlays() {
|
||||
return (
|
||||
@@ -710,7 +711,7 @@ function EvaluateDialogInner({ initial }: { initial: string }) {
|
||||
});
|
||||
};
|
||||
const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
if (e.nativeEvent.isComposing) return;
|
||||
if (isImeKey(e.nativeEvent)) return;
|
||||
const el = e.currentTarget;
|
||||
if (e.key === "Enter" && e.shiftKey && (e.metaKey || e.ctrlKey)) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in new issue
Заблокувати користувача