mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-09-01 14:50:54 +08:00
fix(editor): prevent esc from exiting fullscreen on macos when modal open (#11789)
This commit is contained in:
@@ -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?.();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user