I've created a video player progress bar on codesandbox.io (https://codesandbox.io/s/seekbar-with-thumbnail-and-time-tooltips-forked-h5x8k?file=/src/Progressbar.tsx), which is working fine on chrome but not on other browsers.
Specially on firefox the progressbar slider isn't working, dragStart and dragEnd event are firing just fine but not the onDrag event.
onDrag event has all the wrong values for clientX clientY etc.
After some googling Ive found about dataTransfer and added that to drag start event handler too...
event.dataTransfer.setData("application/x-moz-node", event.target.id);
and event.preventDefault()
on my dragEnd event handler, but still the same.
Can someone help me out here?
Entire code is available at the codesandbox link I've pasted above.
EDIT: ON DRAG EVENT IS FIRING, BUT WITH THE FOLLOWING PROPERTIES SAME EVERYTIME
screenX: 0
screenY: 0
clientX: 0
clientY: 0
pageX: 0
pageY: 0
IS CAUSING THE ISSUE. WHY IS ALL THIS 0?