Opened 13 years ago
Closed 13 years ago
#7494 closed defect (fixed)
ContentPane: _loadCheck function not checking isLoaded when preload true
Reported by: | mathew | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit | Version: | 1.1.1 |
Keywords: | ContentPane _loadCheck | Cc: | |
Blocked By: | Blocking: |
Description
The _loadCheck function in dijit.layout.ContentPane has the following logic:
if(this.href && (forceLoad || (this.preload && !this._xhrDfd) || (this.refreshOnShow && displayState && !this._xhrDfd) || (!this.isLoaded && displayState && !this._xhrDfd) )
If the show function in dijit.Dialog is called when preload is true, it is likely that content has already been loaded, but the if test ignores isLoaded flag. _xhrDfd will be undefined, unless a download is in progress as it is deleted when the download completes.
I suggest that the line:
(this.preload && !this._xhrDfd) ||
is changed to:
(this.preload && !this.isLoaded && !this._xhrDfd) ||
Change History (4)
comment:1 follow-up: 2 Changed 13 years ago by
comment:2 Changed 13 years ago by
Replying to bill:
Hi. Can you explain why this is special for Dialog? (Or does it happen for plain ContentPane too?)
I came across this issue in the context of working with a Dialog, so that is the reason I mentioned it. I haven't tested it for a plain ContentPane?, but I guess it will probably affect a ContentPane? as well.
comment:3 Changed 13 years ago by
Milestone: | tbd → 1.2 |
---|---|
Owner: | set to bill |
Status: | new → assigned |
Summary: | ContentPane _loadCheck function not checking isLoaded when preload true → ContentPane: _loadCheck function not checking isLoaded when preload true |
OK. I'll check in this change, although there's something weird in ContentPane.js in that it's calling _loadCheck() twice, once in startup() and once in postCreate(). Should research that at some point.
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [14931]) Fixes #7494: #7494: ContentPane? _loadCheck function not checking isLoaded when preload true !strict
Hi. Can you explain why this is special for Dialog? (Or does it happen for plain ContentPane too?)