Skip to content
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

Missing "options" property on <select> elements #428

Closed
anatolsommer opened this issue Mar 24, 2022 · 4 comments · Fixed by #495
Closed

Missing "options" property on <select> elements #428

anatolsommer opened this issue Mar 24, 2022 · 4 comments · Fixed by #495
Labels
enhancement New feature or request

Comments

@anatolsommer
Copy link

The options property on <select> elements is missing leading to problems when using happy-dom in vitest (and probably with Vue in general), see vitest-dev/vitest#1013 .

https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/options

@capricorn86 capricorn86 added the enhancement New feature or request label Mar 27, 2022
@johny
Copy link

johny commented Apr 22, 2022

Yep, this leads to problem when testing <select> components. For example with React & Vitest, the test fail with: TypeError: Cannot read properties of undefined (reading 'length') message.

@sbayd
Copy link

sbayd commented Jun 1, 2022

+1

fatihcure-jf added a commit to fatihcure-jf/happy-dom that referenced this issue Jun 7, 2022
fatihcure-jf added a commit to fatihcure-jf/happy-dom that referenced this issue Jun 7, 2022
fatihcure-jf added a commit to fatihcure-jf/happy-dom that referenced this issue Jun 7, 2022
capricorn86 added a commit that referenced this issue Jun 8, 2022
…ed-options

#428@minor: Fixes select element undefined options error.
@capricorn86
Copy link
Owner

Thanks to @fatihcure-jf we now have support for HTMLOptGroupElement, HTMLOptGroupElement and HTMLSelectElement.

You can read more about the release here:
https://github.com/capricorn86/happy-dom/releases/tag/v5.1.0

@anatolsommer
Copy link
Author

Works now, vitest-dev/vitest#1013 closed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants