-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Click events inside wrapped <label> elements do not cascade #1614
Comments
This caught us off guard too, when random checkbox tests started to fail after happy-dom update. Looking into it the developer was using testing-library We had to fix the tests by using |
…hen clicking on an element inside of a label
…hen clicking on an element inside of a label
…nput inside of a label (#1743) * fix: [#1605] Fixes issue when using filtering in TreeWalker, which caused it not to work according to spec * fix: [#1605] Fixes issue when using filtering in TreeWalker, which caused it not to work according to spec * chore: [#1614] Fixes issue where input change event wasnt triggered when clicking on an element inside of a label * chore: [#1614] Fixes issue where input change event wasnt triggered when clicking on an element inside of a label
This issue needs to be closed. |
Thank you for reporting @EvHaus and @cythrawll! 🙂 This has been fixed now in v17.1.8. |
Describe the bug
The behavior of happy-dom v13.6.2 and v15.10.2 differs in that in v13 when you click on elements inside a
<label>
tag, it follows the browser spec and triggers theonChange
events for the wrapped input element. However, in v15 this behavior is no longer working. I'm not sure where between 13.6.2 and 15.10.2 this broke.To Reproduce
Given the following DOM structure rendered via
happy-dom
:And the following JS code
Expected behavior
If you click on the
span#description
element, it should trigger theonChange
event on theinput
element. In v13.6.2 it does. In browsers it does. But in v15.10.2 it doesn't.Screenshots
N/A
Device:
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: