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
{{ message }}
Repository navigation
ListBox: throw undefined error calling preventDefault() when running jest tests. #6184
Error undefined calling preventDefault() is raised for ListBox onChange callback when callback calls e.preventDefault.
Because onChange originalEvent is undefined (at least when running jest tests, got error at listbox.cjs.js around line 483)
Reproducer
No response
PrimeReact version
10.5.3
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Not easy to provide reproducer nor steps to reproduce.
Activity
primefaces#6184 ListBox avoid undefined error while reading preventDe…
melloware commentedon Mar 21, 2024
Why did you close your PR?
primefaces#6184 ListBox: originalEvent might be undefined.
arnodemer commentedon Mar 21, 2024
By Bad, I delete local branch .
I create another PR:
#6205
Fix primefaces#6184: Handle null originalEvent in Jest tests
melloware commentedon Mar 21, 2024
I actually submitted one that fixes all instances of this and not just in ListBox.
Fix #6184: Handle null originalEvent in Jest tests (#6206)