Skip to content
Permalink
Browse files

Adds box-sizing check for IE9 inputs and buttons

  • Loading branch information...
timmywil
timmywil committed Apr 14, 2011
1 parent 1dda994 commit d4b31a15ff7bd0ffb6576229d34a98ce1c9c4085
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/css.js
@@ -344,7 +344,8 @@ function getWH( elem, name, extra ) {
// We're addressing the way Firefox handles certain inputs and buttons,
// offsetWidth/height actually returns a normal width/height
boxSizing = rinputbutton.test( elem.nodeName ) &&
curCSS( elem, "-moz-box-sizing" ) === "border-box";
( curCSS( elem, "-moz-box-sizing" ) === "border-box" ||
curCSS( elem, "box-sizing" ) === "border-box" );

This comment has been minimized.

Copy link
@jdalton

jdalton Apr 16, 2011

Member

Curious about the bug here. Would you explain the issue?

This comment has been minimized.

Copy link
@timmywil

timmywil Apr 16, 2011

Member

This code is no longer present, but jboesch had a fix for inconsistent width on inputs and buttons due to the different default behavior of box-sizing in different browsers. Different widths were being returned for different browsers, but due to the aforementioned box-sizing style being different, we were actually returning correct values. However, there is still a problem in IE8 even when box-sizing: content-box is set. http://bugs.jquery.com/ticket/4146

This comment has been minimized.

Copy link
@jdalton

jdalton Apr 16, 2011

Member

Thanks for explaining it :D


// IE will return auto if we try to grab a width/height that is not set
if ( boxSizing || cur === "auto" ) {

0 comments on commit d4b31a1

Please sign in to comment.
You can’t perform that action at this time.