From 6586141134e76c3dcd4d0d538154daeaf40f78dd Mon Sep 17 00:00:00 2001 From: KoloMl Date: Wed, 26 Mar 2025 20:43:19 +0400 Subject: [PATCH] Fixed missed re-initialization of tags list after tag form was submitted --- src/lib/components/TagsListBlock.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/components/TagsListBlock.ts b/src/lib/components/TagsListBlock.ts index 3603fcf..bb5f507 100644 --- a/src/lib/components/TagsListBlock.ts +++ b/src/lib/components/TagsListBlock.ts @@ -196,6 +196,13 @@ export function initializeAllTagsLists() { export function watchForUpdatedTagLists() { on(document, eventFormEditorUpdated, event => { - event.detail.closest('#image_tags_and_source') + const tagsListElement = event.detail.closest('#image_tags_and_source'); + + if (!tagsListElement || getComponent(tagsListElement)) { + return; + } + + new TagsListBlock(tagsListElement) + .initialize(); }); }