← Back to Catalog

Input overlay click outside preserves

input-overlay-click-outside-preserves

Input overlay: click outside preserves and closes.

Description

For input overlays, a click outside should close the overlay and preserve what was entered. Discarding input on outside click punishes a common dismiss gesture; failing to close leaves the overlay stuck. Preserve-and-close matches the stay-on-page pattern for lightweight input layers. Explicit Cancel may still abandon on purpose; the outside-click path is keep the value and dismiss.

When to use

Input overlays that collect values without leaving the page.

Not when

Explicit Cancel actions that intentionally abandon overlay input.

Agent hint

On outside click, close the input overlay and keep the entered value.

Pass

Clicking outside an input overlay closes it and preserves the input.

Fail

Click outside discards the input, or does not close.

Citations

Ant Design — Stay on the Page

https://ant.design/docs/spec/stay

Open UX · cited UX rules agents audit against

Privacy · Sources ·