-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug: phantom VDOM node erroring render when using React Aria ListBoxItem
#4539
Comments
I think this is expected, on DOM nodes you are not allowed to change the previous sibling. This can only be done during DOM operations. |
What also confused me is that two stack frames up from the error, // preact: children.js:343
function insert(parentVNode, oldDom, parentDom) {
//...
parentDom.insertBefore(parentVNode._dom, oldDom || null);
//...
} |
Not sure how this library works exactly but it looks like when we call You can see that calling Now, rather than passing a I am unsure how to interpret this personally 😅 I haven't dug too deep in the code, I've done a pretty shallow exploration. I reckon to fix this we'd need to know what the target is for this piece of code i.e. what is child referring to here. From the error we can derive it's an implementation of EDIT: sorry didn't mean to close |
Describe the bug
A React Aria
ComboBox
containingListBoxItem
options fails to render with errorCannot set property previousSibling of #<Node>
, render works normally for equivalent React applicationTo Reproduce
I created an issue demonstration repository here which uses the latest version of Preact (10.24.3 at time of writing). The issue demonstration repository is the bare minimum to reproduce the issue, and compares the erroring Preact application with the normally functioning, equivalent React application.
To reproduce the error in Preact and compare against the working React application, run the following after cloning the repository
In another terminal:
Note that
Observe the following in the developer console in the Preact application:
Observe the following output in the React application:
Expected behavior
The Preact application should produce the same output as the React application. My best guess of what is going on is outlined here, it may be the case that Preact is attempting to render a layer of the VDOM hierarchy that does not exist, but I'm not certain.
The text was updated successfully, but these errors were encountered: