Opened 6 years ago

Last modified 20 months ago

#16676 assigned defect

dojox/gesture/tap causes later events to fail on Android < 4.1 and IOS

Reported by: Eric Durocher Owned by: Evan
Priority: undecided Milestone: 1.14
Component: Dojox Version: 1.8.3
Keywords: Cc: bill
Blocked By: Blocking:

Description

When an application listens to tap events, for example:

 on(node, tap.hold, handler);

no "click" events are fired after that on the node.

This can be reproduced with the attached test case (modified version of dojox\gesture\tests\test_gesture.html): on a mobile browser (for example an iphone/ipad), press and release over the inner/outer node, no "click" log is displayed, whereas it is correctly displayed on a desktop browser, or an Android 4.1+ device.

What causes this is the preventDefault() call in dojox/gesture/Base::_process. On most mobile OS's, this has the effect that the browser will not perform its default action of (among others) firing a "click" after a "touchstart"/"touchend" sequence. Android 4.1, on the other hand, still fires a click even if preventDefault() was called.

Attachments (2)

test_gesture.html (3.5 KB) - added by Eric Durocher 6 years ago.
Test case to reproduce lack of click events when listening to dojox/gesture/tap - Eric Durocher (IBM, CCLA)
gesture_click.patch (2.3 KB) - added by Eric Durocher 6 years ago.
Fix dojox/gesture/tap so click events are fired + test case - Eric Durocher (IBM, CCLA)

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by Eric Durocher

Attachment: test_gesture.html added

Test case to reproduce lack of click events when listening to dojox/gesture/tap - Eric Durocher (IBM, CCLA)

Changed 6 years ago by Eric Durocher

Attachment: gesture_click.patch added

Fix dojox/gesture/tap so click events are fired + test case - Eric Durocher (IBM, CCLA)

comment:1 Changed 6 years ago by Eric Durocher

Owner: changed from Adam Peller to Evan
Status: newassigned

comment:2 Changed 6 years ago by bedfordsean

I can also replicate this behaviour in dojox/gesture/swipe.

comment:3 Changed 6 years ago by Eric Durocher

Cc: bill added

See new patch proposal on #15878

comment:4 Changed 6 years ago by Eric Durocher

With the #15878 fix, the present defect should be fixable by setting dojoClick on the node where the gesture is listened to. Not really clear though whether we should do it in the dojox/gesture code itself, or if this should be left to the application code. Doing it in dojox/gesture is a bit complex because dojoClick should be cleared when all gesture listeners are removed (thus requiring to save the previous value, and handle cases where several gestures are listened to...), so this may not be worth the code and could be much simpler to do in the application.

comment:5 Changed 3 years ago by dylan

Milestone: tbd1.11

Very small patch and a test case. Do you want to land this or not?

Ideally would be done with a feature test rather than a browser sniff.

comment:6 Changed 3 years ago by dylan

Milestone: 1.111.12

Ok, after massive triage, ended up with about 80 tickets for 1.11 and 400 or so for 1.12. That's a bit unrealistic, so first I changed all 1.12 to 1.13 (with the plan to move some forward to the new 1.12. Now, I'm moving some of the 1.11 tickets that are less likely to get done this month without help to 1.11. Feel free to help out in January if you want to see this ticket land in 1.11.

comment:7 Changed 3 years ago by dylan

Milestone: 1.121.13

Ticket planning... move current 1.12 tickets out to 1.13 that likely won't get fixed in 1.12.

comment:8 Changed 20 months ago by dylan

Milestone: 1.131.14
Note: See TracTickets for help on using tickets.