Keep code-card fallback scoped to its native section preview

This commit is contained in:
zsviczian committed 2026-11-02 15:57:16 +01:00
1 parent 88e8d0792a
commit 7fd460224b
2 files changed
+4 -1

No files matched your search

@@ -58,6 +58,7 @@ test("retired APIs, changed files and closing views cannot resize a replacement
});
test("missing or detached previews have a bounded wait and no resize side effects", async () => {
for (const configure of [f => f.view.excalidrawAPI = null, f => f.view.file = null, f => f.view.getEmbeddableLeafElementById = () => null,
f => f.view.getEmbeddableLeafElementById = () => ({ leaf: { view: { containerEl: f.container } } }),
f => f.container.isConnected = false, f => f.container.ownerDocument = {}, f => f.container.querySelector = () => null,
f => f.container.getBoundingClientRect = () => ({ top: 0, width: 0 }), f => f.pre.getBoundingClientRect = () => ({ bottom: 0, height: 0 })]) {
await exercise(configure, f => {