Skip to content

fix: take the closing flag back when a close is vetoed - #30

Merged
porksteak merged 1 commit into
masterfrom
fix/stuck-closing-class
Sep 9, 2026
Merged

porksteak merged 1 commit into
masterfrom
fix/stuck-closing-class

Conversation

@porksteak

Copy link
Copy Markdown
Collaborator

The dialog is flagged as closing a beat before it actually closes, so that a paint landing between close() and the native close event does not make it blink out and back in. The flag was optimistic with no way back: a submit or cancel handler bound after dialogify's own can still call preventDefault(), and the dialog was then left open wearing a class whose pointer-events: none made it impossible to interact with.

The flag now schedules a guard that takes it back on the next task if the dialog is still open, which covers every veto path rather than each one in turn. The guard is cleared once a close goes through, so an exit animation is never cut short.

The closing styles now also require the dialog to have actually closed, so a lingering flag can no longer disable an open dialog on its own.

The dialog is flagged as closing a beat before it actually closes, so that
a paint landing between close() and the native close event does not make
it blink out and back in. The flag was optimistic with no way back: a
submit or cancel handler bound after dialogify's own can still call
preventDefault(), and the dialog was then left open wearing a class whose
`pointer-events: none` made it impossible to interact with.

The flag now schedules a guard that takes it back on the next task if the
dialog is still open, which covers every veto path rather than each one
in turn. The guard is cleared once a close goes through, so an exit
animation is never cut short.

The closing styles now also require the dialog to have actually closed,
so a lingering flag can no longer disable an open dialog on its own.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@porksteak
porksteak merged commit ceb407d into master Sep 9, 2026
2 checks passed
@porksteak
porksteak deleted the fix/stuck-closing-class branch September 9, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant