Opened 7 years ago

Closed 7 years ago

#16273 closed defect (fixed)

Calling this.set() in postMixInProperties causes TypeError

Reported by: Kris Zyp Owned by: bill
Priority: undecided Milestone: 1.9
Component: Dijit Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

Calling a this.set() in postMixInProperties functioned properly in 1.6, but in 1.7 this no longer works. Before the buildRendering is called and the DOM nodes are set as properties, the set() method on dijit/_WidgetBase will try to access the default node and fail in trying to iterate over the attributes.

Attachments (1)

set-postMixInProperties.patch (1.8 KB) - added by Kris Zyp 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Kris Zyp

comment:1 Changed 7 years ago by bill

Milestone: tbd1.9

Calling a this.set() in postMixInProperties functioned properly in 1.6, but in 1.7 this no longer works.

Like I said in #15953, for any custom setter that accesses the DOM, calling it in postMixInProperties() has always caused an exception.

It is true about the regression where calling set("foo", "bar") fails, even though there's no custom setter for "foo".

There's also a gray area for calls like set("role", ...), where the code you mentioned tries to automatically map "role" to the this.domNode or this.focusNode, even though there's no explicit custom setter. Set() calls like that will get an exception in postMixInProperties(), rather than not doing anything. I'm not sure which way is better.

comment:2 Changed 7 years ago by bill

Resolution: fixed
Status: newclosed

In [29903]:

Fix corner case regression where you can't call set("foo", "bar") from postMixInProperties(), even if setting "foo" isn't supposed to access the DOM. Fixes #16273 !strict.

Note: See TracTickets for help on using tickets.