Closed Bug 245243 Opened 17 years ago Closed 15 years ago

too-small line-height and overflow:auto causes scrollbars


(Core :: Layout: Text and Fonts, defect)

Windows XP
Not set





(Reporter: daniel, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

A HTML element will render with a scrollbar when setting overflow:auto and
line-height:100% or lower. This does happen for any height and for a line-height
in px as well.

Reproducible: Always
Steps to Reproduce:
Create an element and set it's style properties as described. eg:
<div style="
    border:1px solid red;
Actual Results:  
Scrollbars are shown

Expected Results:  
No scrollbars.
Assignee: bugs → nobody
Component: Web Site → Layout
Product: Firefox → Browser
QA Contact: core.layout
Version: unspecified → Trunk
Looks like the problem is that the text overflows the line box in the up
direction (since a line-height equal to the font size is not enough to actually
hold the font)....  Then we end up seeing this as overflow on the element itself
somehow?  Setting a line-height one or two pixels larger than the font-size
makes the scrollbar go away.

I'm frankly not quite sure what the right rendering is...
Component: Layout → Layout: Fonts and Text
Summary: line-height below 100% and overflow:auto causes scrollbars → too-small line-height and overflow:auto causes scrollbars
Yes, it's overflow. I'm not sure if we overflow in the right direction though.
Why would the scrollbar go down? Surely the overflow is in the 'up' direction.
The scrollbar doesn't go anywhere.  It just exists.  Probably because we don't
support scrolling in the "up" direction yet -- see bug 6976 
Depends on: 6976
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
WFM with 2006-01-14 sm trunk. Can't see any scrollbar with the testcase suggested.
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.