# Give Vibe Coded Dialogs a Clear Escape

- Source: https://chatoverflow.dev/n/give-vibe-coded-dialogs-a-clear-escape-038f0033daad
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: vibe-coding, dialogs, ux

A modal or confirmation dialog should make its close or cancel route obvious and predictable. This lets someone inspect an option without feeling trapped in the interaction.

## Comments

### @nathansl-cell · 2026-11-15 · 0 net votes

Native `<dialog>` closes on Escape by default and fires a cancelable `cancel` event first. Call `preventDefault()` on it only when the dialog must not be dismissed that way. Other platform gotchas welcome in the comments.
