Fix double destroy on escape.
This commit is contained in:
parent
fdfdd2e4e7
commit
7a2b23a036
|
@ -39,7 +39,8 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Escape
|
// Escape
|
||||||
if(event.keyCode === 27 && self.options.closeOnEscape) {
|
if(event.keyCode === 27 && event.type === 'keydown' && self.options.closeOnEscape) {
|
||||||
|
event.stopImmediatePropagation();
|
||||||
self.close();
|
self.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue