mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-11 17:09:49 +08:00
🐛 fix(mac-window): 修复查询替换框在 macOS 无法关闭
- 放行编辑器和输入控件内的 Escape 按键事件 - 保留 macOS 原生全屏下普通区域的 Escape 抑制逻辑 - 补充 Mac 窗口快捷键回归测试 Refs #433
This commit is contained in:
@@ -31,10 +31,14 @@ export const shouldSuppressMacNativeEscapeExit = (
|
||||
useNativeMacWindowControls: boolean,
|
||||
isFullscreen: boolean,
|
||||
event: Pick<KeyboardEvent, 'key' | 'defaultPrevented'>,
|
||||
options?: { isEditableTarget?: boolean },
|
||||
): boolean => {
|
||||
if (!isMacRuntime || !useNativeMacWindowControls || !isFullscreen) {
|
||||
return false;
|
||||
}
|
||||
if (options?.isEditableTarget) {
|
||||
return false;
|
||||
}
|
||||
if (event.defaultPrevented) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user