Skip to content

Commit 79cc576

Browse files
committed
Also check for mutationFree property on root node
Upstream PR: codex-team#2164
1 parent 6c0555a commit 79cc576

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/components/block/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,12 @@ export default class Block extends EventsDispatcher<BlockEvents> {
207207
!mutationsOrInputEvent.some(({
208208
addedNodes = [],
209209
removedNodes,
210+
target,
210211
}) => {
212+
if ((target as HTMLElement).dataset?.mutationFree === 'true') {
213+
return true;
214+
}
215+
211216
return [...Array.from(addedNodes), ...Array.from(removedNodes)]
212217
.some(node => $.isElement(node) && (node as HTMLElement).dataset.mutationFree === 'true');
213218
});

0 commit comments

Comments
 (0)