From dc2f1e68cd3214047ec7b88cf060daf7152ee408 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 18 Sep 2020 10:22:24 +0300 Subject: [PATCH] Dropdown: fix variable always evaluating to true (#31673) --- js/src/dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 8cfa5564ab..5e3ed4c56e 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -469,7 +469,7 @@ class Dropdown { event.preventDefault() event.stopPropagation() - if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { + if (!isActive || (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { if (event.which === ESCAPE_KEYCODE) { $(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus') }