gwt-dnd
gwt-dnd copied to clipboard
Synthetic touch events not generated correctly for Mobile Safari
Does the issue occur in "quirks mode", "standards mode" or both? If you
don't know, does your HTML page contains a DOCTYPE declaration?
N/A
What version of GWT are you using? 1.4.60? 2.0.4? Other?
2.5.0
What version of the gwt-dnd jar file or library file are you using?
3.2.3
What operating system(s) are you using? Windows? Linux? Mac?
Windows, Mac, iOS. Found on iOS, may occur on other platforms with touch
support.
Does the issue occur in web mode, development mode (formerly "hosted
mode"), both or don't know?
Occurs in web mode, do not know about development mode.
What browser(s) do you use? Chrome, Firefox, IE, Safari, other?
Chrome, Firefox, IE, Safari, Mobile Safari. Issue is apparent in Mobile Safari.
What is the browser version (if you know) from Help->About?
N/A for Mobile Safari. iOS version is 6.1.3, but occurs on others.
What steps will reproduce the problem? Please attach sample code if you
can.
1. Install and initialize fastclick.js.
2. Set up an item that is both clickable and draggable.
3. JavaScript errors: touches is null in fastclick.js
What is the expected output? What do you see instead?
Item should report clicks.
Do you have a workaround?
No.
Please provide any additional information below.
Traced to DOMUtil.createTouchEndEvent. The code assumes it can set evt.touches,
evt.changedTouches. This is not true for Mobile Safari, and possibly Safari;
you must use evt.initTouchEvent. As a result, evt.touches and
evt.changedTouches are *not* set and are left null. See
http://developer.apple.com/library/safari/#documentation/UserExperience/Referenc
e/TouchEventClassReference/TouchEvent/TouchEvent.html. This method apparently
also exists in Firefox.
A patch correcting this has been developed; it is applied on top of the patch
for issue 22372. It works by detecting and using initTouchEvent if applicable
(typeof evt.initTouchEvent === "function"). It also includes all available
event data when creating the event.
Original issue reported on code.google.com by [email protected]
on 27 Jun 2013 at 3:25
Attachments:
[deleted comment]
[deleted comment]
Wrong issue number, I entered our internal bug number instead of yours. The
issue here is issue 171.
Original comment by [email protected]
on 27 Jun 2013 at 3:36