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
Cannot read properties of undefined (reading 'getRootNode') #467
Comments
Thank you for reporting @smarlhens! 🙂 It might be a bug as a change was made on that part of the code in v2.51.1. I will investigate what may have caused it. |
Hey! I'm also running into issues with this using vitest and react with happy-dom |
@WonderPanda you don't happen to have a open project that I can test in? 🙂 |
I'm facing the same error while using a
It should fail with the following error message: The test is located in this file. Somehow it's only possible to run the first test without errors although both tests are identical. I'm also not 100% sure if this a problem with Thanks in advance for any feedback and for your support!!! |
Here is a codesandbox with the minimal possible code to produce this error. Indeed, it only happens when running a second test (when adding a |
I can confirm this is related to |
I'm blocked by this as well in happy-dom@6.0.2 |
#467@patch: Fix getRootNode() undefined on document.
…efore handling custom elements by calling Element.getRootNode().
…ies-of-undefined-reading-getrootnode #467@patch: Adds check for if the active element is of type Element b…
Thanks for reporting @smarlhens! 🙂 I am sorry that it has taken such a long time for me to fix this. It has been a lot going on in my private and work life, but now I will have time to focus on Happy DOM again. I have made a fix. Hopefully it will solve your problem. Feel free to re-open otherwise. You can read more about the related releases here: |
Hi there 👋🏻 ,
I hope it is the right place to ask, and I apologize if not. I'm currently trying to bump version of happy-dom from
2.51.0
to a greater one usingvitest
&vue 3
but I'm facing the following error:happy-dom version:
3.1.0
(I've tried multiple version between this one and2.51.0
)vitest version:
0.10.0
It seems to be related to usage of
@headlessui/vue
(version1.5.0
) but I haven't found yet the root cause.Thanks in advance for your help, wish you a nice day ☀️
The text was updated successfully, but these errors were encountered: