Files
Netcatty/infrastructure/appLockOverlayDom.ts
T
bincxz 8a4bec65dc fix(app-lock): topmost overlay and gate remaining capture key handlers
Raise the lock screen to max z-index and hide the context-menu portal while
locked. Centralize isAppLockOverlayActive and gate ChatInput slash picker,
SFTP shortcuts, theme modal, and shortkey/hotkey recorders so earlier
window-capture listeners cannot steal unlock keystrokes.
2026-08-06 05:00:00 +08:00

14 lines
574 B
TypeScript

/** DOM marker for the App Lock overlay root (`data-app-lock-overlay`). */
export const APP_LOCK_OVERLAY_SELECTOR = "[data-app-lock-overlay]";
/**
* True when the App Lock overlay is currently mounted.
* Window/document capture key handlers that register before the overlay must
* consult this so password keystrokes cannot mutate app state behind the lock.
*/
export function isAppLockOverlayActive(
doc: Document | null | undefined = typeof document !== "undefined" ? document : null,
): boolean {
return Boolean(doc?.querySelector(APP_LOCK_OVERLAY_SELECTOR));
}