0

Is there a way to shift the position of a click (X and Y) ? I will be changing the cursor to a bigger image, and precisely, I want to change the position of a click without the user noticing it. For example, If I clicked position (0,0) on the DOM, I want the (0,128) area to be clicked.

Thanks!

Basilf
  • 401
  • 5
  • 17
  • "I will be changing the cursor to a bigger image" - how are you doing this? – Dai Jul 14 '20 at 17:40
  • The only way you should be changing the cursor to a custom image is with the CSS `cursor:;` property (instead of ugly hacks like absolutely positioning an element based on `mousemove` events), in which case the `cursor:` property lets you specify the "hotspot" in pixel coordinates, like in the linked QA I posted. – Dai Jul 14 '20 at 17:41
  • @Dai this works well enough, marking as an answer. Thanks! – Basilf Jul 15 '20 at 08:08

0 Answers0