You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(editor): suppress editor shortcuts under every modal, not just some
Z, T and C kept adding regions to the timeline behind the Export modal.
The guard added in 65aa74e asked `isDialogOpen() || isConfigOpen` — one
flag for the AI providers dialog, one for the keyboard shortcuts dialog.
Those are the two whose open state had been lifted into a context for an
unrelated reason (#420); every other modal keeps its `useState` in the
component that mounts it, so the guard could not see Export, Open project,
New project, Edit clip or the unsaved-changes prompt. The guards above it
only skip inputs, textareas and contentEditable targets, and ModalShell
focuses a `tabIndex={-1}` div, so every shortcut sailed through.
Ask the screen instead of the flags. `isModalOpen()` looks for an element
with `aria-modal="true"`, which ModalShell, LeftPanel's hand-rolled portal
and — now that `ui/dialog` states it, since Radix 1.1.15 does not — the two
Radix dialogs all render. One predicate, and the modals that do not exist
yet are covered for free.
`store/undo` gets the same line. NewEditorShell defers Ctrl+Z / Ctrl+Y to
that listener's own `window` handler, which had no modal guard at all, so
undo rewrote the document under every modal, including the two the shell
did suppress.
`EditorDialogsActions.isDialogOpen` and the `sectionRef` that mirrored the
section for it had no other caller and go with it.
Fixes#434
0 commit comments