mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Fix tagjoinnext
This commit is contained in:
parent
1487ed64c7
commit
de10e55265
2 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue