From 3a4b240c3e703c3b19c15adf6dc22d86c7e899cf Mon Sep 17 00:00:00 2001 From: KoloMl Date: Sat, 14 Dec 2024 23:57:20 +0400 Subject: [PATCH] Clearing the input after successfully removing the tag --- assets/js/tagsinput.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/js/tagsinput.ts b/assets/js/tagsinput.ts index 74574906..8a7d4b06 100644 --- a/assets/js/tagsinput.ts +++ b/assets/js/tagsinput.ts @@ -112,7 +112,10 @@ export function setupTagsInput(tagBlock: HTMLDivElement) { name = name.slice(1); // eslint-disable-line no-param-reassign const tagLink = assertNotNull($(`[data-tag-name="${escapeCss(name)}"]`, container)); - return removeTag(name, assertNotNull(tagLink.parentElement)); + removeTag(name, assertNotNull(tagLink.parentElement)); + inputField.value = ''; + + return; } tags.push(name);