fix keyboard removal of choices. fixes #1839
This commit is contained in:
parent
7fb1d01f64
commit
cb7aefaeda
@ -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 });
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user