e.nativeEvent.offsetX is 0 on mouseMove inside setState function
I have the following code that gets the cursor position on a canvas element. The code works fine in Chrome, but in Firefox, the e.nativeEvent.offsetX is 0 inside the set state function and outside is normal. I know that the solution would be to store the offsets and then use them, but I’m curious if this is a bug or why it is not “supposed” to work..