Pavol Puna
Pavol Puna

Reputation: 11

Android Pointer Events coordinates

I have a problem with PointerEvents on Android Chrome version 64.0.3282.137.

In my solution i use pointer event with html canvas. I capture event coordinates in canvas by event.offsetX and event.offsetY parameters. This working well in previous versions, but in this version coordinates are wrong.

This is reflected both in landscape and portrait mode, and only in Android version of Chrome. I tested it in Huawei M2, Samsung S6 Edge+, S8.

It is a bug in this version?

Or is another possibility, how to get correct coordinates.

Thanks

Upvotes: 1

Views: 183

Answers (1)

dzekoo
dzekoo

Reputation: 81

I am also facing the same issue for clientX and clientY. You can try touch event like "touchstart" and can use event.originalEvent.touches for the x and y coordinates. Have opened a bug on chromium for it and it is accepted. This is the link : https://bugs.chromium.org/p/chromium/issues/detail?id=811715

Upvotes: 1

Related Questions