You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the onChange 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:
document.querySelector('#description').click();// "howdy" should be printed
Expected behavior
If you click on the span#description element, it should trigger the onChange event on the input 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:
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-librarys getByTextinstead ofgetByLabelText`. So it was selecting the div node we had in the label, so our click events were no longer triggering the output.
We had to fix the tests by using getByLabelText as a work around.
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: