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

Change event fired too often on select element #1603

Closed
fbecker-fds opened this issue Nov 12, 2024 · 1 comment · Fixed by #1610
Closed

Change event fired too often on select element #1603

fbecker-fds opened this issue Nov 12, 2024 · 1 comment · Fixed by #1610
Assignees
Labels
bug Something isn't working

Comments

@fbecker-fds
Copy link

Describe the bug
After upgrading to v15 our tests started to fail because the change event on a select was fired way too often (twice as often in this reproducer).

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/vitest-dev-vitest-hfkusq?file=test%2Fbasic.test.ts
  2. Run npm install && npm run test (uses v14)
  3. Tests work
  4. Upgrade happy-dom to v15 in package.json
  5. Run npm install && npm run test
  6. Tests fail
@fbecker-fds fbecker-fds added the bug Something isn't working label Nov 12, 2024
@capricorn86 capricorn86 self-assigned this Nov 13, 2024
capricorn86 added a commit that referenced this issue Nov 13, 2024
capricorn86 added a commit that referenced this issue Nov 14, 2024
…n changing value or index

* fix: [#1603] HTMLSelectElement should not dispatch "change" event when changing value or index

* chore: [#1603] Tries to fix integration test

* chore: [#1603] Fixes failing integration test
@capricorn86
Copy link
Owner

Thank you for reporting @fbecker-fds! 🙂

A fix has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants