-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
Bug
There is an error in vdom sometimes when using the <body> tag.
Package Version: 7.0.0-alpha.6
Code
The following unit test reproduces the issue,
it('can attach body and have widgets inserted nodes that are positioned after the body', () => {
const factory = create({ icache });
const Button = factory(function Button({ children }) {
return <div><button>{children()}</button></div>
});
const Body = factory(function Button({ children }) {
return <body><div>{children()}</div></body>
});
const App = factory(function App({ middleware }) {
const open = middleware.icache.getOrSet('open', false);
debugger;
return (
<div>
<div>first</div>
{ open && <Button>Close</Button>}
{ open && <Body>Body</Body> }
<div><button onclick={() => {
middleware.icache.set('open', !middleware.icache.getOrSet('open', false));
}}>Click Me</button></div>
</div>
);
});
const r = renderer(() => w(App, {}));
r.mount({ domNode: root });
(root as any).children[0].children[1].children[0].click();
resolvers.resolve();
});Expected behavior:
I can use <body> to my hearts abandon ❤️
Actual behavior:
I get a vdom error 😢
Metadata
Metadata
Assignees
Labels
No labels