Opened 7 years ago

Closed 7 years ago

#18608 closed defect (fixed)

dojo/on/asyncEventListener throws on Android 4.3

Reported by: gfarkas Owned by: dylan
Priority: low Milestone: 1.10.5
Component: Events Version: 1.10.4
Keywords: Cc: [email protected]
Blocked By: Blocking:


Affects stock browser on Android version 4.3.1. Reproducable in the Android Emulator and Samsung Galaxy S III LTE. Other Android versions could also be affected.

When asyncEventListener is declared as a dependency, the module definition callback will throw the following error on line 17:

TypeError: Object #<HTMLDivElement> has no method 'click'

dojo/on/debounce is dependant on asyncEventListener, thus any code relying on event debouncing will not be executed.

Moving; under the try block seems to prevent this bug from occuring. Just wrapping it in another try-catch works as well, and in this case requiresClone will still be true.

Change History (8)

comment:1 Changed 7 years ago by gfarkas

As per the DOM 2 specification click event simulation is only for certain types of input elements.

Simulate a mouse-click. For INPUT elements whose type attribute has one of the following values: "button", "checkbox", "radio", "reset", or "submit".

I can confirm that changing the dummy div element construction in asyncEventListener from domConstruct.create('div', null, baseWin.body()) to domConstruct.create('input', {type: 'button'}, baseWin.body()) fixes this defect on Android 4.3

comment:2 Changed 7 years ago by bill

Cc: [email protected] added

Ben, can you look at this one?

comment:3 Changed 7 years ago by iDo

Sure, the proposed approach seems fine. i'll make sure it still works as expected in old browsers

comment:4 Changed 7 years ago by iDo

Made the fix:

I also included NodeJs? support

comment:5 Changed 7 years ago by bill

Owner: changed from Kris Zyp to bpayton
Status: newassigned

I'm unclear if Ben has commit privileges. If not, then Brandon should push this (if it looks OK to him) since he pushed the original code.

comment:6 Changed 7 years ago by iDo

@bill: nope, I don't have commit privileges :'( ;)

comment:7 Changed 7 years ago by dylan

Milestone: tbd1.10.5
Owner: changed from bpayton to dylan
Priority: undecidedlow

Splitted the commit so this could be backported, since 1.10 doesn't have the Intern test branch. Backported to 1.10.

comment:8 Changed 7 years ago by dylan

Resolution: fixed
Status: assignedclosed

Fixed via 31a8ad6afbc296532110e3312fdefb29174ed49c and 01b03b3fc182a66235c9ed689b27aebd4ca7ce68 , and backported to 1.10 via f40743de6505d6436fabee012882a7b18bf3c175

Note: See TracTickets for help on using tickets.