If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Reflow of table with style "margin-right: auto;" creates unneeded horizontal scrollbar

RESOLVED WORKSFORME

Status

()

Core
Layout
RESOLVED WORKSFORME
12 years ago
11 years ago

People

(Reporter: Thomas Andrews, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 www.thomasoandrews.com
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 www.thomasoandrews.com

In the above page, if you select a different value in the <select> control, it causes the application to resize the containing table so that a horizontal scrollbar is added to the application.

The select does not resize.  But for some reason, a reflow of the HTML is triggered, and DOM Inspector shows the containing table to go off the screen to the right.

Reproducible: Always

Steps to Reproduce:
1. Choose another value in the <select> menu


Actual Results:  
A horizontal scrollbar shows up in the application window, as if it is resized to be too wide for the screen.

Expected Results:  
No change should occur in the reflow.

It also occurs on Windows.
Happens in FF 1.5/Win as well.
OS: MacOS X → All
Hardware: Macintosh → All
Confirming with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051202 Firefox/1.6a1 ID:2005120206.

Changing OS to all.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Also happens in Camino.

-> Core
Component: General → Layout
Product: Firefox → Core
Version: unspecified → Trunk
(Reporter)

Comment 4

12 years ago
Interestingly, the redraw also occurs if you open a link on the page in a new tab.
(Reporter)

Comment 5

12 years ago
Correction, if you have no tabs open, it redraws with the scrollbar if you open a link in the new tab, assuming you have 'hide tabs when there is only one tab' set.
(Reporter)

Comment 6

12 years ago
Okay, this has nothing to do with <select> per se.

In fact, you can reproduce it with the example at:

http://www.thomasoandrews.com/examples/mozilla/sizing/nonselect.html

If you resize your window without changing the window's width, just its height, you can induce the bug.  That's why creating a new tab in the previous comments showed the problem - it amounted to resizing the window without changing the width.

You can do this by manually resizing, or you can show or hide a toolbar (which resizes the height but not width of the display window.)  For some reason, this isn't 100%, but if it doesn't work by showing a hidden toolbar, you can probably reproduce it by hiding the toolbar.
Summary: Choosing value from <select> causes horizontal scrollbar to show → Reflow with "margin-right: auto;" causes unnecessary horizontal scrollbar
(Reporter)

Updated

12 years ago
Summary: Reflow with "margin-right: auto;" causes unnecessary horizontal scrollbar → Reflow of table with style "margin-right: auto;" creates unneeded horizontal scrollbar
(Reporter)

Comment 7

12 years ago
Created attachment 205127 [details]
A minimalist example

Load the attachment, then choose a toolbar to show or hide via the 'View/Toolbars" menu.  You should see the horizontal scrollbar.  You might have to show then hide a toolbar before the scrollbar appears.
QA Contact: general → layout

Comment 8

11 years ago
WFM

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20061231 Minefield/3.0a2pre
I can no longer reproduce this with

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070102 Minefield/3.0a2pre ID:2007010204 [cairo]

My guess is this was fixed by the reflow branch landing.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.