From 4ef632d108bd1635239c74f7b2e6aa347fb6b048 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Tue, 19 Nov 2019 21:41:20 +0000 Subject: [PATCH] Text change --- src/scripts/choices.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/choices.js b/src/scripts/choices.js index ddd0a4f..99404c8 100644 --- a/src/scripts/choices.js +++ b/src/scripts/choices.js @@ -1327,7 +1327,7 @@ class Choices { const hasActiveDropdown = this.dropdown.isActive; const hasItems = this.itemList.hasChildren(); const keyString = String.fromCharCode(keyCode); - const wasAlphaNumericInput = /[a-zA-Z0-9-_ ]/.test(keyString); + const wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString); const { BACK_KEY, @@ -1341,7 +1341,7 @@ class Choices { PAGE_DOWN_KEY, } = KEY_CODES; - if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericInput) { + if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) { this.showDropdown(); if (!this.input.isFocussed) {