Text change

This commit is contained in:
Josh Johnson 2019-11-19 21:41:20 +00:00
parent 10f834ce36
commit 4ef632d108

View file

@ -1327,7 +1327,7 @@ class Choices {
const hasActiveDropdown = this.dropdown.isActive; const hasActiveDropdown = this.dropdown.isActive;
const hasItems = this.itemList.hasChildren(); const hasItems = this.itemList.hasChildren();
const keyString = String.fromCharCode(keyCode); const keyString = String.fromCharCode(keyCode);
const wasAlphaNumericInput = /[a-zA-Z0-9-_ ]/.test(keyString); const wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString);
const { const {
BACK_KEY, BACK_KEY,
@ -1341,7 +1341,7 @@ class Choices {
PAGE_DOWN_KEY, PAGE_DOWN_KEY,
} = KEY_CODES; } = KEY_CODES;
if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericInput) { if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) {
this.showDropdown(); this.showDropdown();
if (!this.input.isFocussed) { if (!this.input.isFocussed) {