#4511 ESCAPE key close ALL opened modal dialogs

#4511 ESCAPE key close ALL opened modal dialogs


Commented here: http://dev.jqueryui.com/ticket/4511#comment:2
The dialog itself binds keydown event to itself for closing the dialog
on ESC; in addition, the dialog overlay binds a keydown event to
document, without filtering to close only the active dialog.
There doesn't seem be a trivial way to detect multiple modal dialogs.
Maybe the right approach here is to prevent multiple modal dialogs in
the first place. If we allow two, we allow an unlimited amount, sure
to be causing performance issues, as each creates its own overlay.
What do you think?
Jörn