#12735 closed defect (fixed)
Tree: saved open/closed state of one tree can interfere with another
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dijit | Version: | 1.6.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In Tree.js, postMixInProperties() does:
if(!this.cookieName){ this.cookieName = this.id + "SaveStateCookie"; }
If the Tree doesn't have an id specified (ex: new Tree{{id: "foo"})), an id is auto-generated. The problem is that the auto-generation occurs after the code above runs.
Workaround: just specify an id on your trees
Change History (5)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [24462], trac missed the commit again.
comment:3 Changed 10 years ago by
Could there still be a collision problem with Trees running prior to 1.7 which had "SaveStateCookie?" recorded as a cookieName without an id?
comment:4 Changed 10 years ago by
There should be no collision. Although that cookie may still be in users' browsers' caches, it won't be accessed. After upgrading to 1.7 Tree won't look for a cookie unless it has an explicit id, and in that case it will look for a different cookie name.
But… if the Tree's ID is auto-generated I think we might be better off not doing any cookies, because an auto-generated id could easily change, or be duplicated across pages (for a multi-page application).