You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a page already has a handler for "ESC", and you show a modal dialog, the "ESC" event is trapped by the previous handler and not by the dialog.
In my case, I use this great polyfill in an open-source chrome extension: https://github.com/zmandel/Plus-for-Trello/blob/1c2fa9ca36327211834fd8f2933cfb47ad69ecf1/source/card.js#L360
and in that line you can see that I had to manually catch the keydown and close()
That dialog code is injected into a trello "card" (trello.com) and without it Trello will close the card and leave my dialog floating. Not sure if this is specific with being on a chrome extension.
The text was updated successfully, but these errors were encountered:
Thanks for reporting. I think the polyfill doesn't go out of its way to be the "top" handler for keyboard presses. BTW, if this is for a Chrome extension, you can just use the native <dialog> instead of the polyfill, as Chrome supports <dialog>.
If a page already has a handler for "ESC", and you show a modal dialog, the "ESC" event is trapped by the previous handler and not by the dialog.
In my case, I use this great polyfill in an open-source chrome extension: https://github.com/zmandel/Plus-for-Trello/blob/1c2fa9ca36327211834fd8f2933cfb47ad69ecf1/source/card.js#L360
and in that line you can see that I had to manually catch the keydown and close()
That dialog code is injected into a trello "card" (trello.com) and without it Trello will close the card and leave my dialog floating. Not sure if this is specific with being on a chrome extension.
The text was updated successfully, but these errors were encountered: