Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#12422 closed defect (duplicate)

FilteringSelect with client side store causes infinite recursion when setting value

Reported by: zhuxw Owned by: Douglas Hays
Priority: high Milestone: 1.7
Component: Dijit - Form Version: 1.6.0
Keywords: FilteringSelect infinite recursion Cc:
Blocked By: Blocking:

Description

Setting value to FilteringSelect? will sometimes cause infinite recursion. See dijit/form/FilteringSelect.js function _setValueAttr. When calling set("value", ...) to a FilteringSelect?, which is the standard way, this function is called. But later it'll call _callbackSetLabel in the callback of store.fetchItemByIdentity. If the store is a client side store, then at this time the _setValueAttr has not end yet. What does _callbackSetLabel do? It calls this.set("item", ...)! Here's the tricky thing, the FilteringSelect?._setItemAttr first calls its super class method, which is _AutoCompleterMixin._setItemAttr, which will call this.set("value", ...)!

So the recursion is: FilteringSelection?._setValueAttr -> FilteringSelection?._callbackSetLabel -> FilteringSelection?._setItemAttr -> _AutoCompleterMixin._setItemAttr -> FilteringSelection?._setValueAttr

This loop never ends, and finally causes "too much recursion" in Firefox.

Attachments (1)

filtering-select-defect.html (1.4 KB) - added by zhuxw 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by zhuxw

comment:1 Changed 9 years ago by bill

Owner: set to Douglas Hays

comment:2 Changed 9 years ago by Douglas Hays

This is from trunk, not 1.6.0. I need to know what revision was being tested.

comment:3 Changed 9 years ago by Douglas Hays

I'm testing with [23999] and it's not happening for me. Does it only occur randomly (you mentioned "will sometimes cause")?

comment:4 Changed 9 years ago by Douglas Hays

Milestone: tbd1.7
Resolution: duplicate
Status: newclosed

Presumed to be fixed by [23986].

comment:5 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.