web dev question
Darius Kazemi
- 1y ·
-
Public·
-
friend.camp
This content was marked as sensitive. Click to reveal
SOLVED! See my followup post
I ran into a weird issue at work that ate up a few hours the other day. I was implementing a simple toggle button in React and if I clicked it say 10 times in 5 seconds, only ~9 of the times would register. I did a performance audit and it turned out that onclick was occasionally not firing, but onpointerup consistently worked.
So I bound the eventlistener to onpointerup, which solved the problem but... what could be the root issue? Any ideas?