mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
fix changes to tags not being reflected when editing in io mode (#3768)
This commit is contained in:
parent
71e2a6f782
commit
df808727c8
1 changed files with 7 additions and 0 deletions
|
@ -277,8 +277,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
hidden: hideFieldInOcclusionType(index, ioFields),
|
||||
})) as FieldData[];
|
||||
|
||||
let lastSavedTags: string[] | null = null;
|
||||
function saveTags({ detail }: CustomEvent): void {
|
||||
tagAmount = detail.tags.filter((tag: string) => tag != "").length;
|
||||
lastSavedTags = detail.tags;
|
||||
bridgeCommand(`saveTags:${JSON.stringify(detail.tags)}`);
|
||||
}
|
||||
|
||||
|
@ -535,6 +537,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
imageOcclusionMode,
|
||||
);
|
||||
|
||||
$: if (isImageOcclusion && $ioMaskEditorVisible && lastSavedTags) {
|
||||
setTags(lastSavedTags);
|
||||
lastSavedTags = null;
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
function wrap(before: string, after: string): void {
|
||||
if (!$focusedInput || !editingInputIsRichText($focusedInput)) {
|
||||
|
|
Loading…
Reference in a new issue