Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(chips): prevents item deletion when text is selected
Browse files Browse the repository at this point in the history
Closes #2322
  • Loading branch information
Robert Messerle committed Apr 15, 2015
1 parent ea185ea commit b65236b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/chips/js/chipsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
}
break;
case this.$mdConstant.KEY_CODE.BACKSPACE:
if (!event.target.selectionStart) {
if (!event.target.selectionStart && !event.target.selectionEnd) {
event.preventDefault();
if (this.items.length) this.removeChip(this.items.length - 1);
event.target.focus();
Expand Down

0 comments on commit b65236b

Please sign in to comment.