Closed Bug 397383 Opened 18 years ago Closed 16 years ago

ScrollWidth error and showing of horizontal scrollbar when it isn't needed

Categories

(Firefox :: General, defect)

2.0 Branch
x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: 357.gaby, Unassigned)

Details

(Whiteboard: [CLOSEME 2010-07-30])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 In a html In a div with overflow: auto ... If I have multiple child elements (divs) with 100 percent width no horizontal scrollbar appears ... as it should be. But If I dynamically add an absolutely positioned element to the container div and position it to have the same offsetTop and offsetLeft as one of the original child elements ... as well as the same with and height (Firebug show all size/position attributes to be identical) for some reason the containing div displays the horizontal scollbar and it's scrollwidth is increased to be larger than the clientWidth. ... Please note that the offsetLeft + OffsetWidth of the element added is equal to container.clientWidth. I have a made a simple webpage demonstrating the problem. It isn't online, and since I don't see anywhere to upload a file I will post the code in the Steps To reproduce box. In this simple webpage the problem happens each and every time ... but where I first encountered the bug (in a larger application) the problem does not happen on each page load ... but if it happens on a page load than it happens every time the dynamic addition is executed. ... The same hold true in the larger application too (element.offsetLeft + element.offsetWidth == contaier.clientWidth). Also, after being forced to add this bug in the general category, may I suggest that you add a category for the Geko engine or Html rendering engine, or whatever name you wish to give the category. Reproducible: Always Steps to Reproduce: I have added a html testcase to the bug. It should be pretty much clear on top of the explanation int he details box. Actual Results: The horizontal scrollbar is visible. Expected Results: The horizontal scrollbar should not be visible.
This bug was originally reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME http://www.mozilla.com http://support.mozilla.com/kb/Managing+profiles http://support.mozilla.com/kb/Safe+mode
Whiteboard: [CLOSEME 2010-07-30]
Version: unspecified → 2.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.8 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: