Skip to main content

Bug Tracker

Side navigation

#8952 closed bug (fixed)

Opened April 24, 2011 08:45PM UTC

Closed April 24, 2011 09:19PM UTC

outerWidth calculated differently in FF4 and IE8 (jQuery 1.6b)

Reported by: anonymous Owned by:
Priority: low Milestone: 1.next
Component: dimensions Version: 1.6b1
Keywords: Cc:
Blocked by: Blocking:
Description

Since jQuery 1.6b, outerWidth gives a different result in IE8 vs FF4 if performing it on a <select> element that has padding and/or border.

http://jsfiddle.net/ZZz2d/ (compare it in FF4 and IE8)

Firefox 4 returns the css 'width' value (i.e. the "inner"). This is also what IE8 did prior to 1.6b. It is also the correct way, because select elements are just rendered that way (with the border-box model).

Internet Explorer 8 however now returns the width plus the padding and border (i.e. the "outer"). That may be what you expect from outerWidth, but it is not the actual visual width, which is what we're probably using the function for.

Attachments (0)
Change History (1)

Changed April 24, 2011 09:19PM UTC by timmywil comment:1

component: unfileddimensions
priority: undecidedlow
resolution: → fixed
status: newclosed

That change has been removed since 1.6b1. Thank you! http://jsfiddle.net/timmywil/ZZz2d/1/