Ticket #3901 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Dialog + themeroller breaks in IE6 due to negative minHeight

Reported by: cjwilks Owned by: scott.gonzalez
Priority: critical Milestone: 1.7
Component: ui.dialog Version: 1.6rc5
Keywords: Cc: mctenshi@…
Blocking: Blocked by:

Description

Description courtesy Goonoo Kim. References:

Using JQuery UI 1.6rc5 and jQuery 1.3: The following example doesn't work in IE6.

<!-- height of content is over than 150 -->
<div id="dialog">
 <p>blah blah</p>
<p>blah blah</p>
<p>blah blah</p>
<p>blah blah</p>
<p>blah blah</p>
<p>blah blah</p>
<p>blah blah</p>
<p>blah blah</p>
<p>blah blah</p>
</div>

<script type="text/javascript">
$("#dialog").dialog({minHeight: 150}); // minHeight as default
</script>

In above case, 454 Line of jQuery UI Dialog 1.6rc5 got error on IE6.

this.element
    .css({
        //***IE breaks when this is a negative number***//
        minHeight: options.minHeight - nonContentHeight, 
        height: options.height == 'auto'
            ? 'auto'
            : options.height - nonContentHeight
    }); 

Change History

comment:1 Changed 5 years ago by cjwilks

The workaround for now is to manually set minHeight to something large enough...

$("...").dialog({ minHeight: 500 });

comment:2 Changed 5 years ago by dndrnkrd

Just commented on this in #3930 as well; recommend that

minHeight: options.minHeight - nonContentHeight,

be changed to

minHeight: Math.max(options.minHeight - nonContentHeight,0),

to keep minHeight non-negative

comment:3 Changed 5 years ago by scott.gonzalez

  • Owner set to scott.gonzalez
  • Priority changed from major to critical
  • Status changed from new to accepted

comment:4 Changed 5 years ago by scott.gonzalez

  • Status changed from accepted to closed
  • Resolution set to fixed

Fixed in r1845. Thanks.

Note: See TracTickets for help on using tickets.