by watusername · 2y ago · 0 comments
Instead of checking the more appropriate property that other commenters have suggested (pointerType), I'm a bit surprised that the solution given by the author is to patch up the shaky heuristics even more:
> We could deduce from our final two clues the solution: we need to check for negative numbers as well as positive numbers when checking the screenX and screenY coordinates.
At the time this code was originally written four years ago or whenever it was, not all browsers used PointerEvent for click.