From 4a0247ee25ba4f235bbf87434e9217c50619a1b8 Mon Sep 17 00:00:00 2001 From: Pierre Lebrun Date: Mon, 6 Dec 2021 09:00:13 -0500 Subject: [PATCH] Respect allowClose option when ESC key is pressed --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 8628d77..fa58fa0 100644 --- a/src/index.js +++ b/src/index.js @@ -184,7 +184,7 @@ export default class Driver { } // If escape was pressed and it is allowed to click outside to close - if (event.keyCode === ESC_KEY_CODE) { + if (event.keyCode === ESC_KEY_CODE && this.options.allowClose) { this.reset(); return; } -- GitLab