Open Bug 1385275 Opened 8 years ago Updated 1 year ago

Webpage starts at random scroll positions on certain website

Categories

(Core :: Layout, defect, P3)

54 Branch
defect

Tracking

()

UNCONFIRMED
Tracking Status
firefox57 --- wontfix

People

(Reporter: ttrott, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170628075643 Steps to reproduce: Browse the website: solaranamnesis.com Click on various blog posts. Click the "next" page. Actual results: Each blog post or link I click opens the next page at a random scroll position... it is never at the top of the page. Expected results: The webpage should open at the top (scroll 0) of the webpage. I encounter no such scroll issues in Chrome, so I think it is a Firefox related bug.
Component: Untriaged → Layout
Product: Firefox → Core
For further help to debug the bug, I should note that it has something to do with iframes. Each post has an iframe: <iframe id="picture-iframe" src="..." width="696px" height="696px"></iframe> And there is a CSS element for these: @media only screen and (max-width: 700px) { #picture-iframe { display: none; } So, the scroll issue does not occur if the screen is less than 700px. For instance, I have tested Firefox on a cell phone with a screen less than 700px and there is no issue.
The work-around I found is to include this script: <script language="javascript"> function scrollToTop() { scroll(0,0); } </script> And in every iframe on the page add: onload="scrollToTop()" so that the iframe looks like: <iframe id="picture-iframe" src="..." width="696px" height="696px" onload="scrollToTop()"></iframe>
Priority: -- → P3
Severity: normal → S3
Restrict Comments: true
You need to log in before you can comment on or make changes to this bug.