diff --git a/select2.js b/select2.js index 7ff2c525..a286377d 100644 --- a/select2.js +++ b/select2.js @@ -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 }); },