mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-09 09:22:19 +02:00
Remove unnecessary method
This commit is contained in:
parent
bc9adcf4ff
commit
61dc200bab
|
@ -1911,43 +1911,6 @@ class Choices {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Focus event on everything in the document
|
|
||||||
* @param {Object} e Event
|
|
||||||
* @return
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
_onDocumentFocus (e) {
|
|
||||||
const target = e.target;
|
|
||||||
const hasActiveDropdown = this.dropdown.classList.contains(this.config.classNames.activeState);
|
|
||||||
|
|
||||||
const blurActions = {
|
|
||||||
text: () => {
|
|
||||||
if (target !== this.input) {
|
|
||||||
if (hasActiveDropdown) {
|
|
||||||
this.hideDropdown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'select-one': () => {
|
|
||||||
if (target !== this.containerOuter) {
|
|
||||||
if (hasActiveDropdown && !this.canSearch) {
|
|
||||||
this.hideDropdown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'select-multiple': () => {
|
|
||||||
if (target !== this.input) {
|
|
||||||
if (hasActiveDropdown) {
|
|
||||||
this.hideDropdown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
blurActions[this.passedElement.type]();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Paste event
|
* Paste event
|
||||||
* @param {Object} e Event
|
* @param {Object} e Event
|
||||||
|
|
Loading…
Reference in a new issue