Skip to content

Commit c8699d2

Browse files
committedApr 5, 2024·
apply diff with SVG foreignObject correctly, fixes #140
1 parent 319abef commit c8699d2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
 

‎browser/diffDOM.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎browser/diffDOM.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/diffDOM/dom/fromVirtual.ts

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ export function objToNode(
1717
"http://www.w3.org/2000/svg",
1818
objNode.nodeName,
1919
)
20+
if (objNode.nodeName === "foreignObject") {
21+
insideSvg = false
22+
}
2023
} else if (objNode.nodeName.toLowerCase() === "svg") {
2124
node = options.document.createElementNS(
2225
"http://www.w3.org/2000/svg",

0 commit comments

Comments
 (0)
Please sign in to comment.