Skip to content

Commit d72172c

Browse files
sipriscalebdwilliams
authored andcommitted
Fix: fix nodes added in a tree in Safari
FILTER_REJECT rejects nodes that might have children of type form-associated custom elements. Instead, use FILTER_SKIP. This option traverses the children in such cases.
1 parent 09da720 commit d72172c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/mutation-observers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function observerCallback(mutationList: MutationRecord[]) {
4040
const walker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, {
4141
acceptNode(node: ICustomElement): number {
4242
return internalsMap.has(node) && !formElements?.has(node) ?
43-
NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
43+
NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
4444
}
4545
});
4646

0 commit comments

Comments
 (0)