From 460d3d6589e0be85623db41e97a28317980f26b4 Mon Sep 17 00:00:00 2001 From: Felipe Guizar Date: Thu, 4 May 2017 11:31:15 -0500 Subject: [PATCH] fix bug related with issue #13 --- .../main/java/com/pchmn/materialchips/adapter/ChipsAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/pchmn/materialchips/adapter/ChipsAdapter.java b/library/src/main/java/com/pchmn/materialchips/adapter/ChipsAdapter.java index 2e1083ee..6e000411 100644 --- a/library/src/main/java/com/pchmn/materialchips/adapter/ChipsAdapter.java +++ b/library/src/main/java/com/pchmn/materialchips/adapter/ChipsAdapter.java @@ -140,7 +140,7 @@ public boolean onKey(View v, int keyCode, KeyEvent event) { if(event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_DEL) { // remove last chip - if(mChipList.size() > 0) + if(mChipList.size() > 0 && mEditText.getText().toString().length() == 0) removeChip(mChipList.size() - 1); } return false;