Closed
Bug 740715
Opened 13 years ago
Closed 12 years ago
Viewport jumps to the top of the page when changing orientation on prosport.ro
Categories
(Web Compatibility :: Site Reports, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: paul.feher, Unassigned)
Details
Attachments
(1 file)
27.53 KB,
text/plain
|
Details |
Nightly Fennec 14.0a1 (2012-03-29)
Device: Samsung Nexus S
OS: Android 2.3.6
Steps to reproduce:
1) Load prosport.ro in landscape/portrait mode
2) Scroll page down
3) Change the device orientation portrait/landscape
Expected:
The page viewport stays the same.
Actual:
Viewport jumps to the top of the page.
NOTE:Please see the attached log file.
Comment 1•13 years ago
|
||
This is the desired behaviour of the page. The following script is included on the page:
addEventListener("load", function()
{
setTimeout(updateLayout, 0);
}, false);
var currentWidth = 0;
function updateLayout()
{
if (window.innerWidth != currentWidth)
{
currentWidth = window.innerWidth;
var orient = currentWidth == 320 ? "profile" : "landscape";
document.body.setAttribute("orient", orient);
setTimeout(function()
{
window.scrollTo(0, 1);
}, 1000);
}
}
setInterval(updateLayout, 1000);
Basically any time the width of the browser window changes it will jump back to the top. This happens in desktop firefox as well, if you load the page with the Fennec UA, then scroll down, and resize the width of your browser window.
Updated•13 years ago
|
Component: General → Evangelism
QA Contact: general → evangelism
Updated•13 years ago
|
Component: Evangelism → Mobile
Product: Firefox for Android → Tech Evangelism
Version: Trunk → unspecified
Comment 2•12 years ago
|
||
While I agree it's annoying, this happens for all mobile browsers. (In theory the developers thought this was a good idea, based on the code).
Closing as WONTFIX, but feel free to reopen or contact the site if someone feels this would be a good use of their time.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•7 years ago
|
Product: Tech Evangelism → Web Compatibility
Assignee | ||
Updated•1 years ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•