Closed Bug 359575 Opened 18 years ago Closed 15 years ago

Strange behavior with anchor: impossible to scroll back up

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 325942

People

(Reporter: fgomez, Unassigned)

References

()

Details

(Whiteboard: DUPEME?)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

I am currently developing this website : http://www.vegaustin.com.  When I encountered the problem, I created the directory /moz and placed the HTML output of the PHP script there so that the code would not change as I continue working on the codebase.

At the top of the center column, you will find a list of links beginning with Austin.  All of them (except for the last link) are links to anchors in the same page, in the style of:

<a href="#austin">Austin</a>

The anchors lower in the page are coded as follows:

<h3 class="area"><a name="austin">Austin</a></h3>

Before filing this report, I checked to make sure that the XHTML and CSS on this page validated.

I'm running WinXP Prof.  I was able to reproduce the problem in Ubuntu Linux 6.10.  I also reproduced it in WinXP using the latest nightly build, and in Mozilla 1.7.1 (which happens to be on this computer).  The problem also exists in Netscape 8.1.  There is no such problem when viewing it in IE6.

When you click on one of those links, FF jumps down the page as it should, but distance that the scollbar moves down is always the same, regardless of which link you click.  If you attempt to scroll back up the page, any content between the header and the anchor is lost.

Interestingly, in Moz 1.7.1 or Netscape 8.1, if you attempt to get back to the top of the page using the scroll wheel on the mouse, it is possible to do so.  However, if you scroll up using the scrollbar, the behavior is the same as in Firefox.

It's sort of a difficult problem to describe.  Take a look and you'll see what I mean.

Reproducible: Always

Steps to Reproduce:
1. Go to http://www.vegaustin.com/moz/
2. Click on one of the anchor links at the top of the middle column
3. Try to get back to the top of the page




I'm using the NASA Normal theme on my WinXP box, the Ubuntu Human theme on my Linux Box, the default theme in Netscape, and the Orbit 3+1 1.7 MiK theme in Mozilla.
Attached file reduced test case
Seems to have something to do with a giant padding-bottom/negative margin-bottom inside a overflow: hidden.

If I remember correctly, overflow: hidden is no longer user-scrollable (it used to be possible to do it with mouse scroll).  And it looks like it's also scrolling that div too...

(I haven't looked for dupes yet)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061031 Minefield/3.0a1
(In reply to comment #1)
So I'm not clear... Is the problem caused by a bug in the Mozilla Core, or should "a giant padding-bottom/negative
margin-bottom inside a overflow: hidden" be avoided?  I.e., is the code being interpreted correctly (in which case the code is wrong), or is the code correct but handled incorrectly by the browser?

It turns out some of these issues have been discussed here (http://www.positioniseverything.net/articles/onetruelayout/appendix/equalheightproblems), but I couldn't make heads or tails of it.  It appears the problem has more to do with the overflow property than the padding/margin, though I haven't tested this.
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
See also bug 325942
Depends on: 325942
Although there's no spec for this, I doubt vanishing links are the desired behaviour.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Whiteboard: DUPEME?
Version: 1.8 Branch → Trunk
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: