1
0
mirror of synced 2025-03-10 22:56:12 +03:00

fix keyboard removal of choices. fixes #1839

This commit is contained in:
Igor Vaynberg 2013-10-26 07:57:53 -07:00
parent 7fb1d01f64
commit cb7aefaeda

View File

@ -2443,6 +2443,7 @@ the specific language governing permissions and limitations under the Apache Lic
return opts;
},
// multi
selectChoice: function (choice) {
var selected = this.container.find(".select2-search-choice-focus");
@ -2859,7 +2860,6 @@ the specific language governing permissions and limitations under the Apache Lic
var val = this.getVal(),
data,
index;
selected = selected.closest(".select2-search-choice");
if (selected.length === 0) {
@ -2889,6 +2889,8 @@ the specific language governing permissions and limitations under the Apache Lic
return;
}
selected.remove();
this.opts.element.trigger({ type: "select2-removed", val: this.id(data), choice: data });
this.triggerChange({ removed: data });
},