Permalink
Browse files

allow clearing on backspace as well as delete. fixes #396

  • Loading branch information...
ivaynberg committed Sep 13, 2012
1 parent 6690cc4 commit ab7ab5b3f7fb9985b11ad8af20738ac3466426b8
Showing with 2 additions and 1 deletion.
  1. +2 −1 select2.js
View
@@ -1543,10 +1543,11 @@
return;
}
- if (e.which == KEY.DELETE) {
+ if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {
if (this.opts.allowClear) {
this.clear();
}
+ killEvent(e);
return;
}

0 comments on commit ab7ab5b

Please sign in to comment.