diff --git a/ts/editor/TagEditor.svelte b/ts/editor/TagEditor.svelte index ed71fb149..177114ff8 100644 --- a/ts/editor/TagEditor.svelte +++ b/ts/editor/TagEditor.svelte @@ -145,8 +145,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html return; } - const spliced = tags.splice(index + 1, 1)[0]; - tags[index].name = tags[index].name + spliced.name; + const deleted = deleteTag(tag, index + 1); + tag.name = tag.name + deleted.name; tags = tags; } @@ -163,10 +163,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html if (isLast(index)) { if (tag.name.length !== 0) { appendEmptyTagAt(index); + active = null; + activeAfterBlur = index + 1; } return; } - console.log("movenext", index); active = null; activeAfterBlur = index + 1; diff --git a/ts/editor/TagInput.svelte b/ts/editor/TagInput.svelte index a25ff555e..d43aae210 100644 --- a/ts/editor/TagInput.svelte +++ b/ts/editor/TagInput.svelte @@ -57,8 +57,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html async function joinWithNextTag(event: Event): Promise { const length = input.value.length; dispatch("tagjoinnext"); + await tick(); setPosition(length); + event.preventDefault(); }