From 862bdf1bd282b5c1dae8603548c6974574d560e2 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 25 Oct 2021 21:53:02 +0200 Subject: [PATCH] don't keep focus after clearing element --- tags.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tags.js b/tags.js index e363942..296a47a 100644 --- a/tags.js +++ b/tags.js @@ -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(); }); }