Skip to content

Commit ab7ab5b

Browse files
committed
allow clearing on backspace as well as delete. fixes select2#396
1 parent 6690cc4 commit ab7ab5b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

select2.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,10 +1543,11 @@
15431543
return;
15441544
}
15451545

1546-
if (e.which == KEY.DELETE) {
1546+
if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {
15471547
if (this.opts.allowClear) {
15481548
this.clear();
15491549
}
1550+
killEvent(e);
15501551
return;
15511552
}
15521553

0 commit comments

Comments
 (0)