mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 17:02:33 +02:00
solve 1068
This commit is contained in:
parent
6056cce4e9
commit
a02ea370e3
11855
package-lock.json
generated
11855
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -110,6 +110,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"deepmerge": "^4.2.2",
|
"deepmerge": "^4.2.2",
|
||||||
"fuse.js": "^6.5.3",
|
"fuse.js": "^6.5.3",
|
||||||
|
"pixelmatch": "^5.3.0",
|
||||||
|
"puppeteer": "^19.3.0",
|
||||||
"redux": "^4.1.2"
|
"redux": "^4.1.2"
|
||||||
},
|
},
|
||||||
"npmName": "choices.js",
|
"npmName": "choices.js",
|
||||||
|
|
|
@ -1552,7 +1552,7 @@ function () {
|
||||||
var hasActiveDropdown = this.dropdown.isActive;
|
var hasActiveDropdown = this.dropdown.isActive;
|
||||||
var hasItems = this.itemList.hasChildren();
|
var hasItems = this.itemList.hasChildren();
|
||||||
var keyString = String.fromCharCode(keyCode);
|
var keyString = String.fromCharCode(keyCode);
|
||||||
var wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString);
|
var wasPrintableChar = /[^\x00-\x1F]/.test(keyString);
|
||||||
var BACK_KEY = constants_1.KEY_CODES.BACK_KEY,
|
var BACK_KEY = constants_1.KEY_CODES.BACK_KEY,
|
||||||
DELETE_KEY = constants_1.KEY_CODES.DELETE_KEY,
|
DELETE_KEY = constants_1.KEY_CODES.DELETE_KEY,
|
||||||
ENTER_KEY = constants_1.KEY_CODES.ENTER_KEY,
|
ENTER_KEY = constants_1.KEY_CODES.ENTER_KEY,
|
||||||
|
@ -1563,7 +1563,7 @@ function () {
|
||||||
PAGE_UP_KEY = constants_1.KEY_CODES.PAGE_UP_KEY,
|
PAGE_UP_KEY = constants_1.KEY_CODES.PAGE_UP_KEY,
|
||||||
PAGE_DOWN_KEY = constants_1.KEY_CODES.PAGE_DOWN_KEY;
|
PAGE_DOWN_KEY = constants_1.KEY_CODES.PAGE_DOWN_KEY;
|
||||||
|
|
||||||
if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) {
|
if (!this._isTextElement && !hasActiveDropdown && wasPrintableChar) {
|
||||||
this.showDropdown();
|
this.showDropdown();
|
||||||
|
|
||||||
if (!this.input.isFocussed) {
|
if (!this.input.isFocussed) {
|
||||||
|
@ -1572,7 +1572,7 @@ function () {
|
||||||
the input was not focussed at the time of key press
|
the input was not focussed at the time of key press
|
||||||
therefore does not have the value of the key.
|
therefore does not have the value of the key.
|
||||||
*/
|
*/
|
||||||
this.input.value += keyString.toLowerCase();
|
this.input.value += event.key.toLowerCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4614,7 +4614,7 @@ var templates = {
|
||||||
div.setAttribute('aria-expanded', 'false');
|
div.setAttribute('aria-expanded', 'false');
|
||||||
|
|
||||||
if (labelId) {
|
if (labelId) {
|
||||||
div.setAttribute('aria-labeledby', labelId);
|
div.setAttribute('aria-labelledby', labelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return div;
|
return div;
|
||||||
|
|
2
public/assets/scripts/choices.min.js
vendored
2
public/assets/scripts/choices.min.js
vendored
File diff suppressed because one or more lines are too long
1
public/assets/scripts/choices.min.js.LICENSE.txt
Normal file
1
public/assets/scripts/choices.min.js.LICENSE.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/*! choices.js v10.1.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
|
|
@ -1438,7 +1438,7 @@ class Choices implements 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 wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString);
|
const wasPrintableChar = /[^\x00-\x1F]/.test(keyString);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
BACK_KEY,
|
BACK_KEY,
|
||||||
|
@ -1452,7 +1452,7 @@ class Choices implements Choices {
|
||||||
PAGE_DOWN_KEY,
|
PAGE_DOWN_KEY,
|
||||||
} = KEY_CODES;
|
} = KEY_CODES;
|
||||||
|
|
||||||
if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) {
|
if (!this._isTextElement && !hasActiveDropdown && wasPrintableChar) {
|
||||||
this.showDropdown();
|
this.showDropdown();
|
||||||
|
|
||||||
if (!this.input.isFocussed) {
|
if (!this.input.isFocussed) {
|
||||||
|
@ -1461,7 +1461,7 @@ class Choices implements Choices {
|
||||||
the input was not focussed at the time of key press
|
the input was not focussed at the time of key press
|
||||||
therefore does not have the value of the key.
|
therefore does not have the value of the key.
|
||||||
*/
|
*/
|
||||||
this.input.value += keyString.toLowerCase();
|
this.input.value += event.key.toLowerCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue