mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-15 20:25:18 +02:00
Text change
This commit is contained in:
parent
10f834ce36
commit
4ef632d108
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue