#4066 closed bug (wontfix)
Dialog: Using iframe as dialog content leads to sizing problems in FF3
Reported by: | Skaffen | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.0 |
Component: | ui.dialog | Version: | 1.6rc6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you make an iframe into a dialog with a width being specified for the dialog then the iframe's width will be wrong. It used to work ok under jquery ui 1.5.
The reason for this, I think, is that the dialog code now sets the width of the content to "auto". Under FF3 an iframe given a width of "auto" just sizes itself as if it had no size specified (i.e. it goes to the default size for an iframe under FF3, which I think is 300px). I think it worked under jq-ui 1.5 as 1.5 would always calculate what to set the content width to based on the dialog width plus the margins.
Additionally with this sizing problem if the dialog is resizable and I then resize it the width of the iframe is altered as the dialog's width changes but it's altered by the amount the dialog is resized, so its width will always be off by the same amount.
I've logged this as a bug - however it may be that jquery-ui considers using dialog with an iframe to be unsupported :)
Change History (11)
comment:1 Changed 14 years ago by
Milestone: | TBD → 1.6 |
---|
comment:2 Changed 14 years ago by
Milestone: | 1.7 → 1.8 |
---|
comment:3 Changed 11 years ago by
comment:4 Changed 11 years ago by
Let's figure out what the limitations are and then make a decision. Is this still a problem in newer Firefox?
comment:5 Changed 11 years ago by
Still behaves the same way - also in Chrome (and probably IE). As before it seems to be that setting a style="width: auto" on the iframe results in it adopting a default size rather than filling the dialog outer.
comment:6 Changed 10 years ago by
Milestone: | 1.9.0 → 1.10.0 |
---|
comment:7 Changed 10 years ago by
Summary: | Using iframe as dialog content leads to sizing problems under FF3 → Dialog: Using iframe as dialog content leads to sizing problems in FF3 |
---|
comment:8 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
In the jsfiddle example above, Skaffen is giving the iframe an id="foo" and then calling the dialog on the iframe itself. The outer div is what should be assigned the id="foo". Setting width:auto on an <iframe> doesn't work in general. But, you can just give the iframe a width:100% and it will fill into the space allocated for the dialog. it would be too cumbersome/ugly to try and automatically work around the iframe width:auto limitation in the jqueryui library.
comment:10 Changed 10 years ago by
Are you sure this not a jQuery ui bug?
I mean, the _size() function is overwriting the CSS settings. If you set width=100% via CSS or to the iframe itself, this will be overwritten by the _size() function.
I think that it is better if the dialog preserves the content settings.
comment:11 Changed 10 years ago by
_size()
is doing what it's intended to do. Dialogs are not designed for the main content element to be anything that doesn't support auto sizing. Please read comment:8.
Do we support dialogs with iframes as content?