scrolling to named anchor doesn't consider areas covered by fixed positioned elements

NEW
Assigned to

Status

()

Core
Layout
15 years ago
8 months ago

People

(Reporter: asa, Assigned: dbaron)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [IGNORE COMMENTS 5 THROUGH 8] [webcompat], URL)

Attachments

(1 obsolete attachment)

(Reporter)

Description

15 years ago
a named anchor is not scrolled to the correct position.

In my weblog I have a fixed position div that acts as a banner at the top of the
page. I also have a primary content div that scrolls behind the fixed position
banner div. I set top: 6em; on the primary content div so that the top blog
entry displays lower in the viewport than the fixed position banner div. 
When I click on a link to a named anchor the page scrolls the anchor to the top
of the viewport which is behind the fixed position banner div. It should scroll
the anchor to the "top" which I've specified as 6em lower than the top of the
viewport.

Hixie said this might be a Mozilla bug. It might also be that I don't know what
I'm doing or that my expectations are broken and not Mozilla's layout. There is
no good way to test this on winIE since winIE doesn't do fixed position. Opera
and MacIE display the same behavior as Mozilla. 

Tested with latest trunk and latest 1.1 branch builds on windows, linux and mac.
(Reporter)

Updated

15 years ago
QA Contact: petersen → ian
(Assignee)

Comment 1

15 years ago
Any possible way of fixing this seems like it would be pretty ugly.  It seems
that what you really want is to have the scrollbar be on something that is the
size of the visible area of the body.  However, that's hard without frames.

(Yet again, back to the question of why the HTML folks waited until 2002 to come
up with a good frames design rather than doing better frames in 1997...)
*** Bug 171404 has been marked as a duplicate of this bug. ***
*** Bug 171036 has been marked as a duplicate of this bug. ***

Updated

15 years ago
OS: Windows 2000 → All
*** Bug 206677 has been marked as a duplicate of this bug. ***

Updated

14 years ago
Summary: named anchor not scrolling to correct position → named anchor scrolls to wrong position (involves fixed positioning)

Comment 5

14 years ago
Created attachment 136366 [details]
test case for some other bug

This example shows that selecting a named anchor does not scroll to the right
position. All contents between <a> and </a> should be seen.
Comment hidden (off-topic)
(Assignee)

Comment 7

14 years ago
comment 6 is unrelated to this bug.

Comment 8

14 years ago
(i don't post comments/bugs often, but i like to get them right and not post
duplicates.) this looked like the closest match and the testcase in comment 5
does not involve fixed positioning, so i took the summary's parentheses to mean
optional.
(Assignee)

Updated

14 years ago
Whiteboard: [IGNORE COMMENTS 5 THROUGH 8]
(Assignee)

Updated

14 years ago
Attachment #136366 - Attachment description: Test case → test case for some other bug
Attachment #136366 - Attachment is obsolete: true

Comment 9

12 years ago
Is there a work-around to allow the use of the spacebar or page down for scrolling on pages with fixed position elements?
(Assignee)

Updated

12 years ago
Summary: named anchor scrolls to wrong position (involves fixed positioning) → scrolling to named anchor doesn't consider areas covered by fixed positioned elements

Updated

9 years ago
Duplicate of this bug: 457493
QA Contact: ian → layout

Updated

7 years ago
Duplicate of this bug: 620477
An example of this issue.
https://webcompat.com/issues/3516
Whiteboard: [IGNORE COMMENTS 5 THROUGH 8] → [IGNORE COMMENTS 5 THROUGH 8] [webcompat]
You need to log in before you can comment on or make changes to this bug.