Closed Bug 614909 Opened 14 years ago Closed 5 years ago

Page does not scroll down to anchor link destination

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: DavidCognito, Assigned: bzbarsky)

References

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) Gecko/20101125 Firefox/4.0b8pre Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) Gecko/20101125 Firefox/4.0b8pre Visiting e.g. http://climateprogress.org/2010/11/17/confusionist-judith-curry-wicked-martin-weitzman/#comment-307396 does not scroll the page down to the anchor link destination. Reproducible: Always Steps to Reproduce: 1. open URL http://climateprogress.org/2010/11/17/confusionist-judith-curry-wicked-martin-weitzman/#comment-307396 Actual Results: Page remains at top. Expected Results: Page should go down to comment #4 which beings "Great coverage of the testimony Joe."
Status: UNCONFIRMED → NEW
Ever confirmed: true
This WFM with Javascript off; With Javascript on it scrolls to correct place and then almost immediately (I have a slow machine) scrolls back to top.
John, Now that you mention that I did think I saw a 'jump' once when testing, but it was too quick to see what had happened. I cleared my cache and saw it again now - barely detectable but it's there.
The first bad revision is: changeset: 28215:b43f2b9e0c32 user: Boris Zbarsky <bzbarsky@mit.edu> date: Mon May 11 22:04:58 2009 -0400 summary: Bug 78070. When the root element is removed, remove all frames except the viewport; when it's reinserted, recreate them as needed. r=roc,dbaron sr=roc
Blocks: 78070
Component: General → Layout
OS: Windows 7 → All
Product: Firefox → Core
QA Contact: general → layout
Hardware: x86 → All
Version: unspecified → Trunk
Yeah, this page reframes the root at some point (why, I dunno). That said, this is generally supposed to preserve the scroll position... But I just tested, and while going from block to inline display for the <body> on, say, this bug page does preserve the scroll position, going from inline display to block display does not. And the page the bug is on has the <body> styled display:inline. Timothy, you want me to take this and look into what's going on with scroll state restoration here?
If you want. I wasn't planning on working on it anytime soon since it's not a regression from 3.6.
Assignee: nobody → bzbarsky
Priority: -- → P3
Blocks: 666718
No longer blocks: 666718
http://www.golf.dk/forum#node-13040 Here's a great example of how it scrolls instantly to the right content and when the page finishes loading it jumps to end. Usually a reload scrolls to the correct anchor.

OK, initial testcase in this bug is gone, but a testcase based on comment 5, like so:

<!DOCTYPE html>
<html>
  <body style="display: inline">
    <div style="height: 200vh; border: 1px solid black">A tall div; scroll past
      it.</div>
    <div onclick="document.body.style.display = ''">
      Click me to change the body display to block.
    </div>
  <body>
</html>

Preserves the scroll position when clicking on the text below the tall div. Marking worksforme.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.