Opened 6 years ago

Closed 6 years ago

#9468 closed bug (wontfix)

Dialog width:'auto' does not work in JSFiddle

Reported by: roblugt Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

When creating a UI dialog in JSFiddle, the width: 'auto' feature does not work. Instead the dialog takes up the entire width of the results pane. I have tested this using IE10 and Chrome. It appears to be related to the fact that JSFiddle displays the results in an iFrame - when I run the same code locally in a plain window it works fine.

I have created a test case to demonstrate: http://jsfiddle.net/roblugt/6shus/

There does appear to be a work-around for this: setting the dialog widget's CSS display property to inline-block.

However, if you run the test and create multiple dialogs, moving each one to a different screen location with the mouse, you will probably notice strange behaviour as the individual dialogs are closed. This behaviour includes:

  • the remaining open dialogs scroll to the top of the page (sometimes beyond the top of the results pane)
  • a ghost dialog image sometimes appears on the left of the pane as the dialog is closed

Best regards Rob Lugt

Change History (1)

comment:1 Changed 6 years ago by tj.vantoll

Resolution: wontfix
Status: newclosed

Dialog does not support width: auto, see https://groups.google.com/forum/#!topic/jquery-ui-dev/6EicX8l7o_4.

If someone can get width: auto to work in a cross browser way, we'd be willing to land a patch, but for now it's not supported.

Note: See TracTickets for help on using tickets.