Post #708247
2025-11-07 23:08 UTC
`e.isPrimary` of a `pointerdown` event returns `true` for mouse right-click.
WTF??
#JavaScript
Replies (1)
-
@natevw@toot.cafe 2025-11-17 19:56
@siblingpastry@mastodon.world You probably figured this out, but I got curious and had to double-check that this has to do with the primary-ness of the **pointer** (rather than what that particular pointer is *doing*). Marks that the event is coming from e.g. the main mouse rather than just one rando finger of a multitouch chord. "Authors who desire only single-pointer interaction can achieve that by ignoring non-primary pointers." https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary