Skip to main content

Bug Tracker

Side navigation

#13037 closed bug (notabug)

Opened December 12, 2012 05:33AM UTC

Closed December 12, 2012 01:03PM UTC

Last modified December 31, 2012 01:57AM UTC

On ipad safari event.pageX is undefined

Reported by: Leon Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:
Description

bind("touchstart",function(event){

startX = event.pageX;

}

startX is undefined

Attachments (0)
Change History (7)

Changed December 12, 2012 05:47AM UTC by Leon comment:1

On ipad safari with jQuery1.6.4, it works well

Changed December 12, 2012 06:02AM UTC by Leon comment:2

e.flyDiv.bind("touchstart",function(event){

startX = event.pageX;

startY = event.pageY;

});

attributes as clientX, offsetX are also undefined

Changed December 12, 2012 06:08AM UTC by Leon comment:3

I tried a test on click function, as follow:

e.flyDiv.bind("click",function(event){

startX = event.pageX;

startY = event.pageY;

});

It just works!

Changed December 12, 2012 01:03PM UTC by scottgonzalez comment:4

resolution: → notabug
status: newclosed

Touch Events don't have those properties; they're hidden behind an array of touches. Please ask for help on the forums or StackOverflow.

Changed December 28, 2012 08:04AM UTC by Leon comment:5

Thanks, Scott. But when I used version 1.6.4, touch events just had x/y properties, and all things go well. My project just crashed when I updated jQuery to v1.8.3(so I had to roll back to the old version). Can you check if x/y properties is hidden by jQuery?

Changed December 28, 2012 01:08PM UTC by dmethvin comment:6

Sounds like you need to use event.originalEvent.pageX, since jQuery doesn't know anything about touch events it doesn't try to normalize them.

Changed December 31, 2012 01:57AM UTC by Leon comment:7

Well, thanks for your help!