Opened 7 years ago

Closed 7 years ago

#15936 closed defect (fixed)

Duplicate click events in dojox/mobile/Switch on Android 4.1

Reported by: Eric Durocher Owned by: Eric Durocher
Priority: undecided Milestone: 1.8.1
Component: DojoX Mobile Version: 1.8.0
Keywords: Cc: cjolif
Blocked By: Blocking:

Description

On an Android 4.1 device, when a user taps a dojox/mobile/Switch, the switch does not change state (it flickers but comes back to its original state) because it actually receives 2 successive click events instead of one. This is the same cause as #15878: the code assumes that the OS will not send a click event because the touchstart event was stopped, but this is not true on Android 4.1, the OS does send a click even if touchstart was stopped.

Easily reproduced with dojox/mobile/tests/test_Switch.html

Attachments (1)

15936.patch (850 bytes) - added by Eric Durocher 7 years ago.
Do not send synthetic click events on Android 4.1 - Eric Durocher (IBM, CCLA)

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Eric Durocher

Attachment: 15936.patch added

Do not send synthetic click events on Android 4.1 - Eric Durocher (IBM, CCLA)

comment:1 Changed 7 years ago by Eric Durocher

Cc: cjolif added
Milestone: tbd1.8.1

comment:2 Changed 7 years ago by cjolif

In [29622]:

refs #15936. Fixes an issue with a double click event being dispatched on Android 4.1. Thanks Eric Durocher (IBM, CCLA).

comment:3 Changed 7 years ago by cjolif

In [29623]:

refs #15936. Fixes an issue with a double click event being dispatched on Android 4.1. Thanks Eric Durocher (IBM, CCLA).

comment:4 Changed 7 years ago by cjolif

Ideally I guess the code in #15878 and this one should be factorized in one place so that we have to change the device specific test only at single place in the future.

comment:5 Changed 7 years ago by cjolif

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.