mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 00:42:15 +02:00
Update build files 🏗
This commit is contained in:
parent
592c326442
commit
85f0b5f9be
|
@ -4616,10 +4616,7 @@ function () {
|
||||||
_proto._onKeyDown = function _onKeyDown(event) {
|
_proto._onKeyDown = function _onKeyDown(event) {
|
||||||
var _keyDownActions;
|
var _keyDownActions;
|
||||||
|
|
||||||
var target = event.target,
|
var keyCode = event.keyCode;
|
||||||
keyCode = event.keyCode,
|
|
||||||
ctrlKey = event.ctrlKey,
|
|
||||||
metaKey = event.metaKey;
|
|
||||||
var activeItems = this._store.activeItems;
|
var activeItems = this._store.activeItems;
|
||||||
var hasFocusedInput = this.input.isFocussed;
|
var hasFocusedInput = this.input.isFocussed;
|
||||||
var hasActiveDropdown = this.dropdown.isActive;
|
var hasActiveDropdown = this.dropdown.isActive;
|
||||||
|
@ -4633,8 +4630,7 @@ function () {
|
||||||
UP_KEY = KEY_CODES.UP_KEY,
|
UP_KEY = KEY_CODES.UP_KEY,
|
||||||
DOWN_KEY = KEY_CODES.DOWN_KEY,
|
DOWN_KEY = KEY_CODES.DOWN_KEY,
|
||||||
PAGE_UP_KEY = KEY_CODES.PAGE_UP_KEY,
|
PAGE_UP_KEY = KEY_CODES.PAGE_UP_KEY,
|
||||||
PAGE_DOWN_KEY = KEY_CODES.PAGE_DOWN_KEY;
|
PAGE_DOWN_KEY = KEY_CODES.PAGE_DOWN_KEY; // If a user is typing and the dropdown is not active
|
||||||
var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If a user is typing and the dropdown is not active
|
|
||||||
|
|
||||||
if (!this._isTextElement && /[a-zA-Z0-9-_ ]/.test(keyString)) {
|
if (!this._isTextElement && /[a-zA-Z0-9-_ ]/.test(keyString)) {
|
||||||
this.showDropdown();
|
this.showDropdown();
|
||||||
|
@ -4646,14 +4642,10 @@ function () {
|
||||||
if (keyDownActions[keyCode]) {
|
if (keyDownActions[keyCode]) {
|
||||||
keyDownActions[keyCode]({
|
keyDownActions[keyCode]({
|
||||||
event: event,
|
event: event,
|
||||||
target: target,
|
|
||||||
keyCode: keyCode,
|
|
||||||
metaKey: metaKey,
|
|
||||||
activeItems: activeItems,
|
activeItems: activeItems,
|
||||||
hasFocusedInput: hasFocusedInput,
|
hasFocusedInput: hasFocusedInput,
|
||||||
hasActiveDropdown: hasActiveDropdown,
|
hasActiveDropdown: hasActiveDropdown,
|
||||||
hasItems: hasItems,
|
hasItems: hasItems
|
||||||
hasCtrlDownKeyPressed: hasCtrlDownKeyPressed
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -4699,10 +4691,12 @@ function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._onAKey = function _onAKey(_ref3) {
|
_proto._onAKey = function _onAKey(_ref3) {
|
||||||
var hasItems = _ref3.hasItems,
|
var event = _ref3.event,
|
||||||
hasCtrlDownKeyPressed = _ref3.hasCtrlDownKeyPressed;
|
hasItems = _ref3.hasItems;
|
||||||
|
var ctrlKey = event.ctrlKey,
|
||||||
|
metaKey = event.metaKey;
|
||||||
|
var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If CTRL + A or CMD + A have been pressed and there are items to select
|
||||||
|
|
||||||
// If CTRL + A or CMD + A have been pressed and there are items to select
|
|
||||||
if (hasCtrlDownKeyPressed && hasItems) {
|
if (hasCtrlDownKeyPressed && hasItems) {
|
||||||
this._canSearch = false;
|
this._canSearch = false;
|
||||||
var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;
|
var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;
|
||||||
|
@ -4715,9 +4709,9 @@ function () {
|
||||||
|
|
||||||
_proto._onEnterKey = function _onEnterKey(_ref4) {
|
_proto._onEnterKey = function _onEnterKey(_ref4) {
|
||||||
var event = _ref4.event,
|
var event = _ref4.event,
|
||||||
target = _ref4.target,
|
|
||||||
activeItems = _ref4.activeItems,
|
activeItems = _ref4.activeItems,
|
||||||
hasActiveDropdown = _ref4.hasActiveDropdown;
|
hasActiveDropdown = _ref4.hasActiveDropdown;
|
||||||
|
var target = event.target;
|
||||||
var enterKey = KEY_CODES.ENTER_KEY;
|
var enterKey = KEY_CODES.ENTER_KEY;
|
||||||
var targetWasButton = target.hasAttribute('data-button');
|
var targetWasButton = target.hasAttribute('data-button');
|
||||||
|
|
||||||
|
@ -4775,9 +4769,9 @@ function () {
|
||||||
|
|
||||||
_proto._onDirectionKey = function _onDirectionKey(_ref6) {
|
_proto._onDirectionKey = function _onDirectionKey(_ref6) {
|
||||||
var event = _ref6.event,
|
var event = _ref6.event,
|
||||||
hasActiveDropdown = _ref6.hasActiveDropdown,
|
hasActiveDropdown = _ref6.hasActiveDropdown;
|
||||||
keyCode = _ref6.keyCode,
|
var keyCode = event.keyCode,
|
||||||
metaKey = _ref6.metaKey;
|
metaKey = event.metaKey;
|
||||||
var downKey = KEY_CODES.DOWN_KEY,
|
var downKey = KEY_CODES.DOWN_KEY,
|
||||||
pageUpKey = KEY_CODES.PAGE_UP_KEY,
|
pageUpKey = KEY_CODES.PAGE_UP_KEY,
|
||||||
pageDownKey = KEY_CODES.PAGE_DOWN_KEY; // If up or down key is pressed, traverse through options
|
pageDownKey = KEY_CODES.PAGE_DOWN_KEY; // If up or down key is pressed, traverse through options
|
||||||
|
@ -4824,11 +4818,10 @@ function () {
|
||||||
|
|
||||||
_proto._onDeleteKey = function _onDeleteKey(_ref7) {
|
_proto._onDeleteKey = function _onDeleteKey(_ref7) {
|
||||||
var event = _ref7.event,
|
var event = _ref7.event,
|
||||||
target = _ref7.target,
|
|
||||||
hasFocusedInput = _ref7.hasFocusedInput,
|
hasFocusedInput = _ref7.hasFocusedInput,
|
||||||
activeItems = _ref7.activeItems;
|
activeItems = _ref7.activeItems;
|
||||||
|
var target = event.target; // If backspace or delete key is pressed and the input has no value
|
||||||
|
|
||||||
// If backspace or delete key is pressed and the input has no value
|
|
||||||
if (hasFocusedInput && !target.value && !this._isSelectOneElement) {
|
if (hasFocusedInput && !target.value && !this._isSelectOneElement) {
|
||||||
this._handleBackspace(activeItems);
|
this._handleBackspace(activeItems);
|
||||||
|
|
||||||
|
|
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
Loading…
Reference in a new issue