Skip to content
Snippets Groups Projects
Commit 7a2b23a0 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Fix double destroy on escape.

parent fdfdd2e4
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,8 @@
return;
}
// Escape
if(event.keyCode === 27 && self.options.closeOnEscape) {
if(event.keyCode === 27 && event.type === 'keydown' && self.options.closeOnEscape) {
event.stopImmediatePropagation();
self.close();
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment