Remove unnecessary method

This commit is contained in:
Josh Johnson 2017-08-02 14:14:51 +01:00
parent bc9adcf4ff
commit 61dc200bab

View file

@ -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
* @param {Object} e Event