Can ESC close modals?
meta:293908
On some sites and in some applications, ESC closes modals, pop-ups, and similar things. We have a request for that in qpixel. I'm not sure what should happen if you have more than one "closable thing" open at the time; this requires more analysis.
My intuitive expectation would be that Esc closes the currently active thing, if that's a closable thing, or its parent if that's a closable thing, and so on. So only one thing would be closed with each press, but multiple presses could close multiple things one at a time.
We'd probably need to think carefully about false positives (closing things where the user intended Esc to do something else) in order to avoid losing work. For example, if dragging something to drop somewhere, and then changing their mind, a user can press Esc to avoid the thing being dropped somewhere they didn't intend (which would otherwise happen if they just released the mouse button rather than pressing Esc first). This should only terminate the dragging of the thing, not close any modals.
Agreed -- making you click manually is much better than the risk of lost work. Needs more thought.