Closed Bug 702983 Opened 13 years ago Closed 13 years ago

Opening a new tab doesn't reset scroll position

Categories

(Firefox for Android Graveyard :: General, defect, P1)

ARM
Android

Tracking

(firefox11 fixed, fennec11+)

VERIFIED FIXED
Tracking Status
firefox11 --- fixed
fennec 11+ ---

People

(Reporter: tchung, Assigned: kats)

References

()

Details

Attachments

(2 files)

Attached image Right justified content screenshot (deleted) —
Summary could probably use a clearer description. Basically, if i launch a page that exceeds the viewport, and pan the content all the way to the right, then opening a new tab for a different site, the new tab loads the content right-justified. See screenshot and repro steps Repro: 1) install nightly birch, SGS2: Mozilla/5.0 (Android; Linux armv7l; rv:10.0a1) Gecko/20111116 Firefox/10.0a1 Fennec/10.0a1 2) visit a website that overflows viewport (eg. see URL) 3) when page loads, pan the content to the right to view the content there 4) click the tabbar arrow and open a New Tab 5) Type in another site that has overflow viewport (eg. google.com) 6) Verify new tab loads any sites with the page scaled over to the right Expected: - new tab content should always load left-justified ActuaL: - it persisted my panning to the right, so new loaded pages start right -justified
updating title. it's not just right-ustified, its whatever the last state the panning of that page was left in. so if you had it at 25% or 75% view, a new tab will start the next page in that last state.
Summary: current content pages panned to the far right will load new pages as right justified → current content pages panned state will load new pages in that last state
This sounds alot like 702950.
Priority: -- → P1
You don't have to be switching tabs. You can just load another page on the same tab and it will keep the state. This is quite bad specially when you are at the bottom of a long page and you go to google.com or facebook.com where the height of the page is short. It is bad specially in such case because suddenly your page is loaded up but you see nothing. You are just too far down from the top of the page but you think that the page never loaded as all you can see is nothing even though the page has loaded up.
Severity: normal → major
Assignee: nobody → kgupta
See also bug 704950, which is very related; both bugs will probably be fixed with the same patch.
Summary: current content pages panned state will load new pages in that last state → Opening a new tab doesn't reset scroll position
Comment on attachment 577468 [details] [diff] [review] Ensure viewport is correct for new tab Review of attachment 577468 [details] [diff] [review]: ----------------------------------------------------------------- Looks good - is this necessary to fix this problem beyond what your patches already do on bug #704950?
Attachment #577468 - Flags: review?(chrislord.net) → review+
> Looks good - is this necessary to fix this problem beyond what your patches > already do on bug #704950? Yeah, because with just the other patches the tab dimensions (1x1) get sent to Java in the selectedTab setter when the tab is created, and Java never updates them unless the surface changes, so you end up with a 1x1 viewport. Since Java keeps the "one true viewport size" I tried a different approach where I ignored the JS-provided viewport size and always kept the ones in Java but propagating that information between all the Java viewport objects made it pretty messy.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Samsung Nexus S (Android 4.0.1) 20111130040240 http://hg.mozilla.org/projects/birch/rev/4e745f151abd
Status: RESOLVED → VERIFIED
tracking-fennec: --- → 11+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: