From 31cf38d1bc5359e7358def9e4e12c26907b92fef Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 10 Jun 2025 11:29:58 +0300 Subject: [PATCH] fix: autocomplete tags on body when page has invalid content (#5262) Removed children from content model check in command panel tags. --- .../app/builder/features/command-panel/command-panel.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/builder/app/builder/features/command-panel/command-panel.tsx b/apps/builder/app/builder/features/command-panel/command-panel.tsx index 3e4bd4f899..16ed36eaca 100644 --- a/apps/builder/app/builder/features/command-panel/command-panel.tsx +++ b/apps/builder/app/builder/features/command-panel/command-panel.tsx @@ -265,7 +265,9 @@ const $tagOptions = computed( newInstances.set(childInstance.id, childInstance); newInstances.set(instance.id, { ...instance, - children: [...instance.children, { type: "id", value: childInstance.id }], + // avoid preserving original children to not invalidate tag + // when some descendants do not satisfy content model + children: [{ type: "id", value: childInstance.id }], }); for (const tag of tags) { childInstance.tag = tag;