#10714 closed defect (duplicate)
Dialog error: null bgIframe on page unload
Reported by: | Mike Wilson | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4.2 |
Component: | Dijit | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
This is a tricky bug with Dijit page unload that has eluded me for a while. The problem is this unprotected call to bgIframe.destroy() in DialogUnderlay?.js:
hide: function(){ // summary: // Hides the dialog underlay this.bgIframe.destroy(); this.domNode.style.display = "none"; }
At certain page unload occasions bgIframe will be null, causing an exception. Though, as this is at page unload the exception is not always visible. Add an alert before the destroy call, or use IE with MSSE, and do the following to reproduce the bug:
- open tests/test_Dialog.html
- click "Show Dialog" and then dismiss it
- click "Programatic Dialog" and wait for it to pop up
- leave the last dialog open and navigate away from the page
The page unload destruction process will make _Widget do a
delete this.bgIframe
and later Dialog.js will try to hide the underlay by calling
uninitialize: function(){ ... if(this.open || wasPlaying){ dijit._underlay.hide(); } ... }
which will cause the exception.
The two dialogs are needed because of DOM ordering - the first dialog will be before the underlay in the DOM and the problem will not occur as that dialog is destroyed before the underlay.
(BTW: tested on 1.4.1 but this is not available in Trac menus)
Change History (6)
comment:1 Changed 12 years ago by
Milestone: | tbd → 1.5 |
---|---|
Owner: | set to bill |
comment:2 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Oh actually, this has already been fixed. Dup of #10525.
comment:3 Changed 12 years ago by
Would it be possible to put this fix in the 1.4 branch also, to be available in 1.4.2? (this bug will show to IE users with debugging enabled)
comment:4 Changed 12 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Could you please please please put this one-line fix in the 1.4 branch as well? This bug is hitting us in production and we would really like to keep consuming Dojo from CDN. Having the fix in 1.4.2 would be sweet...
comment:5 Changed 12 years ago by
Milestone: | 1.5 → 1.4.2 |
---|---|
Resolution: | → duplicate |
Status: | reopened → closed |
OK sure, I'll do it under the original ticket, #10525.
Ah good catch, I'll fix it. Looks like the root problem is that Dialog is accessing dijit._underlay after it has been destroyed.