Skip to main content

Bug Tracker

Side navigation

#8345 closed bug (duplicate)

Opened February 22, 2011 09:22AM UTC

Closed February 23, 2011 12:40AM UTC

Last modified March 14, 2012 01:05PM UTC

document width includes scrollbar in IE but not in FF

Reported by: albinohawk Owned by:
Priority: low Milestone: 1.next
Component: dimensions Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery 1.5. Tested in IE 8.0.7600.16385 and Firefox 3.6.13

If the document is longer than the viewport (i.e. a vertical scrollbar is shown) then there is inconsistent behaviour between IE and Firefox.

In Firefox getting the document width using jQuery(document).width() will get the value without the scrollbar (expected behaviour)

In IE however getting the document width will return the width plus scrollbar width.

A test case which uses an 100% width element to show the discrepency can be found at http://jsfiddle.net/qzbzG/1/

Attachments (0)
Change History (2)

Changed February 23, 2011 12:40AM UTC by jitter comment:1

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

Please see my comment on the ticket mentioned below.

Changed February 23, 2011 12:40AM UTC by jitter comment:2

Duplicate of #8048.