solve 1068

This commit is contained in:
محمدرضا ضربی زاده 2022-11-27 15:47:12 +03:30
parent 6056cce4e9
commit a02ea370e3
6 changed files with 10470 additions and 5114 deletions

15565
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -110,6 +110,8 @@
"dependencies": {
"deepmerge": "^4.2.2",
"fuse.js": "^6.5.3",
"pixelmatch": "^5.3.0",
"puppeteer": "^19.3.0",
"redux": "^4.1.2"
},
"npmName": "choices.js",

View file

@ -1552,7 +1552,7 @@ function () {
var hasActiveDropdown = this.dropdown.isActive;
var hasItems = this.itemList.hasChildren();
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,
DELETE_KEY = constants_1.KEY_CODES.DELETE_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_DOWN_KEY = constants_1.KEY_CODES.PAGE_DOWN_KEY;
if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) {
if (!this._isTextElement && !hasActiveDropdown && wasPrintableChar) {
this.showDropdown();
if (!this.input.isFocussed) {
@ -1572,7 +1572,7 @@ function () {
the input was not focussed at the time of key press
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');
if (labelId) {
div.setAttribute('aria-labeledby', labelId);
div.setAttribute('aria-labelledby', labelId);
}
return div;

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
/*! choices.js v10.1.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme */

View file

@ -1438,7 +1438,7 @@ class Choices implements Choices {
const hasActiveDropdown = this.dropdown.isActive;
const hasItems = this.itemList.hasChildren();
const keyString = String.fromCharCode(keyCode);
const wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString);
const wasPrintableChar = /[^\x00-\x1F]/.test(keyString);
const {
BACK_KEY,
@ -1452,7 +1452,7 @@ class Choices implements Choices {
PAGE_DOWN_KEY,
} = KEY_CODES;
if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) {
if (!this._isTextElement && !hasActiveDropdown && wasPrintableChar) {
this.showDropdown();
if (!this.input.isFocussed) {
@ -1461,7 +1461,7 @@ class Choices implements Choices {
the input was not focussed at the time of key press
therefore does not have the value of the key.
*/
this.input.value += keyString.toLowerCase();
this.input.value += event.key.toLowerCase();
}
}