From 018f43a92b1619a4686b326ad2238ab4ef918d5f Mon Sep 17 00:00:00 2001 From: Rupert Dunk Date: Wed, 6 Nov 2024 13:23:25 +0000 Subject: [PATCH] fix(visual-editing): prevent always activating elements on registration (#2100) --- packages/visual-editing/src/controller.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/visual-editing/src/controller.ts b/packages/visual-editing/src/controller.ts index b196239c2..f2b037e9c 100644 --- a/packages/visual-editing/src/controller.ts +++ b/packages/visual-editing/src/controller.ts @@ -351,7 +351,10 @@ export function createOverlayController({ sanity, dragDisabled: !!element.getAttribute('data-sanity-drag-disable'), }) - activateElement(sanityNode) + + if (activated) { + activateElement(sanityNode) + } } function updateElement({elements, sanity}: ResolvedElement) {