#18871 closed defect (fixed)
Firefox not loading DOJO in iframe with display:none
Reported by: | jfduffy | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.11.3 |
Component: | Core | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
We are experiencing an issue with DOJO 1.10.4 where DOJO content will not load if it's in an iframe that is loaded with display:none. This only happens in Firefox (tested with ESR 45.2).
Steps:
- Create an iframe DOM with a DOJO screen and display:none.
- Load the page with this DOM
- After the page is loaded, javascript to remove the "display:none".
Result: The iframe is blank
Notes:
- IE and Chrome work fine in this scenario
- There isn't an error when this happens in our app, but there is an error when I reproduced this outside of our app (below)
- This doesn't happen with any of our other iframe content (struts, angular)
Related tickets: JS Error during load of iframe with style "display:none" in Firefox - This may be the same issue, but I don't believe it is. I am not getting the same error they noted, either in my below case OR in our app. Additionally, adding the fix that is noted there to dojo/dom-style.js did not fix the issue in our app. dom-style.js (the file they are fixing) didn't even seem to be loaded up at any point in our app.
Reproduced case outside of our app (I'm not sure if this is the same problem as our app, the behavior is exactly the same but there is a javascript error with this case, whereas our app does not show an error at all):
<!doctype html> <html> <body> <iframe id="test" frameborder="0" border="0" seamless="seamless" src="http://dojotoolkit.org/documentation/tutorials/1.10/charting/demo/basic-declarative.html" style="display:none; width: 1200px; height: 900px;"></iframe> <button onclick="document.getElementById('test').style.removeProperty('display')">Click</button> </body> </html>
Run the above, and then click the button. The button will remove the display:none, but the iframe won't show it's content, which is the bug I'm reporting.
Running the above produces this error:
dojo/parser::parse() error TypeError: d is null
Change History (7)
comment:1 Changed 4 years ago by
Milestone: | tbd → 1.12 |
---|---|
Version: | 1.11.2 → 1.10.4 |
comment:2 Changed 4 years ago by
This turned out to be caused by the Firefox issue where "getComputedStyle()" returns null. Googling that will return many results. We do not currently have a fix, as returning an empty "getComputedStyle()" still causes our tables to display incorrectly. However I'm not sure why, because Chrome returns a getComputedStyle() as empty instead of null, and that works just fine to display our tables.
comment:3 Changed 4 years ago by
Milestone: | 1.12 → 1.12.1 |
---|
comment:4 Changed 4 years ago by
Owner: | set to Dylan Schiemann <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In bfea978/dojo:
comment:6 Changed 4 years ago by
Component: | General → Core |
---|---|
Milestone: | 1.12.1 → 1.11.3 |
Priority: | undecided → low |
comment:7 Changed 4 years ago by
Note this change has been backported to 1.11.3. It does not cleanly backport to 1.10 from master, but I'd accept a PR for that change if you anyone has time to create one.
Will investigate for 1.12 if time permits.