-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing event normalization in start event handler resets position on touchscreen devices to 0 #9
Comments
Awesome! I'll look into it tonight when I get a second. Since I'm kinda a noob when it comes to iOS event handling, do you think you could give me a little more context around the issue? I'm not sure if I completely understand what's going on, but this is a good start. |
I'm rather new in this field myself, but more and more of our customers request iOS compatibility for their web applications so I need to deal with touchscreen handling in JavaScript (primary for the Apple iPad). I am not sure how exactly Safari emulates mouse events and I think that it may use the touch*-events to do so. At least in the start-handler of overscroll the start function returns false and therefore cancels any further touchstart-events, so it may be a better solution to return "true", but I haven't tried that. I have added a manual click emulation instead by firing a click() on the event target element if a touchend event occured directly after a touchstart (I added a property to track the last value of event.type and checked that in the end-function). Do you have access to an iOS device for testing? If not I could see if I can find some spare time (lunchtime or so), grab a test iPad and run some tests on mouse event emulation in iOS (I should do this anyway I think ;)). |
(Oops, closed the issue by accident) |
I don't have access, but I would be forever grateful for any help you can provide! |
Implemented in 1.4.2 (will release soon!) |
Hello azoff,
you forgot to add the event normalization to the start event handler. Because of this the initial coordinates for scrolling are resetted to zero on iOS devices (testing on event.touches would probably support more touch-enabled os). Adding
to the function resolves this problem. Though I am still missing the click event ;)
Greetings
The text was updated successfully, but these errors were encountered: