Skip to content

Commit 4a0247e

Browse files
anthonylebrunkamranahmedse
authored andcommitted
Respect allowClose option when ESC key is pressed
1 parent 0b31fb7 commit 4a0247e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export default class Driver {
184184
}
185185

186186
// If escape was pressed and it is allowed to click outside to close
187-
if (event.keyCode === ESC_KEY_CODE) {
187+
if (event.keyCode === ESC_KEY_CODE && this.options.allowClose) {
188188
this.reset();
189189
return;
190190
}

0 commit comments

Comments
 (0)