diff --git a/ts/editor/tag-editor/TagEditor.svelte b/ts/editor/tag-editor/TagEditor.svelte
index 527688f3d..8f41b753d 100644
--- a/ts/editor/tag-editor/TagEditor.svelte
+++ b/ts/editor/tag-editor/TagEditor.svelte
@@ -112,6 +112,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
function appendEmptyTag(): void {
// used by tag badge and tag spacer
+ deselect();
const lastTag = tagTypes[tagTypes.length - 1];
if (!lastTag || lastTag.name.length > 0) {
@@ -448,6 +449,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
splitTag(index, detail.start, detail.end)}
on:tagadd={() => insertTagKeepFocus(index)}
on:tagdelete={() => deleteTagAt(index)}
+ on:tagselectall={selectAllTags}
on:tagjoinprevious={() => joinWithPreviousTag(index)}
on:tagjoinnext={() => joinWithNextTag(index)}
on:tagmoveprevious={() => moveToPreviousTag(index)}
diff --git a/ts/editor/tag-editor/TagInput.svelte b/ts/editor/tag-editor/TagInput.svelte
index a9f0f40d4..b9f7c1f32 100644
--- a/ts/editor/tag-editor/TagInput.svelte
+++ b/ts/editor/tag-editor/TagInput.svelte
@@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html