1
0
mirror of synced 2024-11-26 06:46:04 +03:00

Fixed TypeError when destroying Select2

This fixes #2587.
This commit is contained in:
Kevin Brown 2014-10-31 18:15:32 -04:00
parent 7581fa5708
commit 1de4be3749

View File

@ -2214,11 +2214,17 @@ the specific language governing permissions and limitations under the Apache Lic
})); }));
selection.on("mousedown touchstart", "abbr", this.bind(function (e) { selection.on("mousedown touchstart", "abbr", this.bind(function (e) {
if (!this.isInterfaceEnabled()) return; if (!this.isInterfaceEnabled()) {
return;
}
this.clear(); this.clear();
killEventImmediately(e); killEventImmediately(e);
this.close(); this.close();
this.selection.focus();
if (this.selection) {
this.selection.focus();
}
})); }));
selection.on("mousedown touchstart", this.bind(function (e) { selection.on("mousedown touchstart", this.bind(function (e) {