pageX Y on android doesn't get recognized

Hey, not sure how to classify this but when trying to create a custom drag and drop for Android I’m having issues in it recognising event pageX or event touches[0] pageX… It’s pretty bizarre, anyone here experienced this? It works fine on desktop and IOS otherwise.

*Disclaimer Don’t have an android device. Can’t test it.

is it a single touch or a multi touch event? I know you have touches[0] so I’m assuming single.

I did read something about offsetting for accuracy

Are you using jQuery or Vanilla?

Also, maybe try on touchmove, or touch start whichever you don’t have

Just spitballing here :smile: since noone has chimed in.

Yep single touch, touches 0 returns nothing. Ive got it in a hype on drag so it is triggering an event just not touch event in an android. It does in ios.

After more attempts I found I can make it return changed touches, but I’m not sure if its wise to use that one. And I tried to make a condition to say if(event. changedtouches = undefined) or undefined in quotes or =NaN so I can make a condition for ios and Android but it doesn’t trigger at all.

Andy yeah vanilla: p hopefully this may give more info

found this

1 Like