In react, I need to be able to simulate a mousedown event on a range slider, i.e. an input element of type "range".
Particularly, the simulated click should be on the thumb of the slider.
But a solution that can simulate a click at a precise (x, y) value is also welcomed.
Thanks
You can use element.click() to simulate a click on a specific element.
An example can be found here: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click
And it may be possible to click from a certain x and y coordinate. I can't give code, because I don't have enough information from you, but this link could help you out.
https://thewebdev.info/2021/05/23/how-to-simulate-a-click-by-using-x-y-coordinates-in-javascript/