Fix tagjoinnext

This commit is contained in:
Henrik Giesel 2021-06-27 03:28:45 +02:00
parent 1487ed64c7
commit de10e55265
2 changed files with 6 additions and 3 deletions

View file

@ -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;

View file

@ -57,8 +57,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
async function joinWithNextTag(event: Event): Promise<void> {
const length = input.value.length;
dispatch("tagjoinnext");
await tick();
setPosition(length);
event.preventDefault();
}