Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10810 closed defect (duplicate)

dijit._Widget, nodesWithKeyClick, ondijitclick

Reported by: holgerthurow Owned by: Becky Gibson
Priority: high Milestone: tbd
Component: Accessibility Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

Maybe there is a small bug in in dijit._Widget: After defining in line 920

nodesWithKeyClick: ["input", "button"],

there is in line 954 the condition

if(!this.nodesWithKeyClick[obj.tagName.toLowerCase()]){

but nodesWithKeyClick was declared as an array, not an object. As I see it, this.nodesWithKeyClick is not an "associative array", it is a simple array. It does not have keys named "button" or "input". this.nodesWithKeyClick.button doesn't exist. "button" is the value of frame 1 in the array this.nodesWithKeyClick (this.nodesWithKeyClick[0] == "input"; this.nodesWithKeyClick[1] == "button"). So I think you have to do something like

if(dojo.indexOf(this.nodesWithKeyClick, obj.nodeName.toLowerCase()) == -1)

to check, if obj.nodeName.toLowerCase() is contained in this.nodesWithKeyClick.

Change History (2)

comment:1 Changed 9 years ago by bill

Resolution: duplicate
Status: newclosed

Agreed, this is already filed as #9783 (by you) though.

comment:2 Changed 9 years ago by holgerthurow

Yes, but it was never answered. So I tried to get some more attention by filing it another time.

Note: See TracTickets for help on using tickets.