fix(editor): prevent esc from exiting fullscreen on macos when modal open (#11789)

This commit is contained in:
Adam
2026-07-30 00:47:42 -07:00
committed by GitHub
parent 1acf66edab
commit 69d4c346cc
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -34,6 +34,7 @@ export const Modal: React.FC<{
const handleKeydown = (event: React.KeyboardEvent) => {
if (event.key === KEYS.ESCAPE) {
event.preventDefault();
event.nativeEvent.stopImmediatePropagation();
event.stopPropagation();
props.onCloseRequest();
@@ -61,6 +61,7 @@ const MenuContent = ({
}
const onKeyDown = (event: KeyboardEvent) => {
if (event.key === KEYS.ESCAPE) {
event.preventDefault();
event.stopImmediatePropagation();
callbacksRef.onClickOutside?.();
}