1
0
mirror of synced 2025-02-04 06:09:23 +03:00

open multi dropdown on paste. fixes #577

This commit is contained in:
Igor Vaynberg 2013-02-09 23:24:09 -08:00
parent 52c8a9e2cb
commit acdbb02498

View File

@ -661,7 +661,7 @@ the specific language governing permissions and limitations under the Apache Lic
} }
installKeyUpChangeEvent(search); installKeyUpChangeEvent(search);
search.bind("keyup-change input", this.bind(this.updateResults)); search.bind("keyup-change input paste", this.bind(this.updateResults));
search.bind("focus", function () { search.addClass("select2-focused"); }); search.bind("focus", function () { search.addClass("select2-focused"); });
search.bind("blur", function () { search.removeClass("select2-focused");}); search.bind("blur", function () { search.removeClass("select2-focused");});
@ -2022,6 +2022,13 @@ the specific language governing permissions and limitations under the Apache Lic
this.searchContainer = this.container.find(".select2-search-field"); this.searchContainer = this.container.find(".select2-search-field");
this.selection = selection = this.container.find(selector); this.selection = selection = this.container.find(selector);
this.search.bind("input paste", this.bind(function() {
if (!this.enabled) return;
if (!this.opened()) {
this.open();
}
}));
this.search.bind("keydown", this.bind(function (e) { this.search.bind("keydown", this.bind(function (e) {
if (!this.enabled) return; if (!this.enabled) return;