Skip to content

Commit

Permalink
don't keep focus after clearing element
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Oct 25, 2021
1 parent 2d03a7c commit 862bdf1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ class Tags {

if (this.allowClear) {
span.querySelector("button").addEventListener("click", (event) => {
event.preventDefault();
event.stopPropagation();
this.removeItem(value);
document.activeElement.blur();
});
}

Expand Down

0 comments on commit 862bdf1

Please sign in to comment.