[jQuery] Re: getting/setting height() in IE6 quirks mode behaves inconsistently

2008-09-18 Thread Enrique Meléndez Estrada


Please, publish that fix as a jQuery function...thnxs! ;-)

El 17/09/2008 19:26, Matt Kruse escribió:

In IE6, quirks mode, I expect this to not change their height of an
object:

var h = $obj.height();
$obj.height(h);

However, it does cause a re-size (if the object has padding/borders).
Is this intended?
( Using: http://code.jquery.com/jquery-latest.pack.js )

It looks like when height() is called, it returns the internal height,
minus borders and padding.
When height(val) is called, the height includes borders and padding.

I believe these should behave consistently in quirks mode. In
standards mode they work fine.

For now I will write a fix that switches based on compatMode.

Matt Kruse

  



--
Enrique Meléndez Estrada (2367)
Servicios Informáticos
Organización y Servicios Internos
Instituto Tecnológico de Aragón



[jQuery] Re: getting/setting height() in IE6 quirks mode behaves inconsistently

2008-09-17 Thread ricardobeat

There is a reason it's called Quirks mode :)

On Sep 17, 2:26 pm, Matt Kruse [EMAIL PROTECTED] wrote:
 In IE6, quirks mode, I expect this to not change their height of an
 object:

 var h = $obj.height();
 $obj.height(h);

 However, it does cause a re-size (if the object has padding/borders).
 Is this intended?
 ( Using:http://code.jquery.com/jquery-latest.pack.js)

 It looks like when height() is called, it returns the internal height,
 minus borders and padding.
 When height(val) is called, the height includes borders and padding.

 I believe these should behave consistently in quirks mode. In
 standards mode they work fine.

 For now I will write a fix that switches based on compatMode.

 Matt Kruse


[jQuery] Re: getting/setting height() in IE6 quirks mode behaves inconsistently

2008-09-17 Thread Matt Kruse

True, but the whole purpose of a library like jQuery is to abstract
such pains and make it just work. IE6 is still a common browser
(especially in corporate environments) and quirks mode pages are
common. With all the work-arounds for special cases in other areas of
jQuery, I think this should work correctly regardless of doctype as
well. IMO :)

Matt

On Sep 17, 5:49 pm, ricardobeat [EMAIL PROTECTED] wrote:
 There is a reason it's called Quirks mode :)

 On Sep 17, 2:26 pm, Matt Kruse [EMAIL PROTECTED] wrote:

  In IE6, quirks mode, I expect this to not change their height of an
  object:

  var h = $obj.height();
  $obj.height(h);

  However, it does cause a re-size (if the object has padding/borders).
  Is this intended?
  ( Using:http://code.jquery.com/jquery-latest.pack.js)

  It looks like when height() is called, it returns the internal height,
  minus borders and padding.
  When height(val) is called, the height includes borders and padding.

  I believe these should behave consistently in quirks mode. In
  standards mode they work fine.

  For now I will write a fix that switches based on compatMode.

  Matt Kruse