Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5059 closed defect (invalid)

mapNode has no properties caused by bug in dijit._Widget

Reported by: guest Owned by:
Priority: high Milestone:
Component: Dijit Version: 1.0
Keywords: mapNode Cc:
Blocked By: Blocking:

Description (last modified by bill)

There is a bug in the version 1.0 release in dijit._Widget line 122

var mapNode = this[this.attributeMap[attr] || "domNode"];

this fails to define mapNode correctly.

Fix:

var mapNode = this[this.attributeMap[attr]] || this["domNode"];

Change History (5)

comment:1 Changed 12 years ago by guest

Re-submit

There is a but in the version 1.0 release in dijit._Widget line 122

var mapNode = this[this.attributeMap[attr] || "domNode"];

this fails to define mapNode correctly.

Fix:

{{{var mapNode = this[this.attributeMap[attr]]
thisdomNode?;}}

comment:2 Changed 12 years ago by guest

What is wrong with this trac, how do i put code in?

var mapNode = this[this.attributeMap[attr] || "domNode"];

Fix:

var mapNode = this[this.attributeMap[attr]] || this["domNode"];

if this code fails see comment at http://dojotoolkit.org/forum/dojo-core-dojo-0-9/dojo-core-support/mapnode-has-no-properties-dojo1-0

comment:3 Changed 12 years ago by bill

Description: modified (diff)

What's the testcase for this bug?

comment:4 Changed 12 years ago by Adam Peller

Resolution: invalid
Status: newclosed

yeah, I think the current code is correct, even though it does look strange.

thisdomNode?, aka this.domNode is of type Node, so you wouldn't want to do an indirect lookup on 'this'. If the attr is not found in attributeMap, you want mapNode = this.domNode

comment:5 Changed 12 years ago by bill

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