Opening a new tab doesn't reset scroll position

VERIFIED FIXED

Status

()

Firefox for Android
General
P1
major
VERIFIED FIXED
6 years ago
10 months ago

People

(Reporter: tchung, Assigned: kats)

Tracking

unspecified
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 574915 [details]
Right justified content screenshot

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
(Reporter)

Comment 1

6 years ago
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

Comment 2

6 years ago
This sounds alot like 702950.
Blocks: 695448

Updated

6 years ago
Priority: -- → P1
Duplicate of this bug: 703756
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.
Duplicate of this bug: 705450
Summary: current content pages panned state will load new pages in that last state → Opening a new tab doesn't reset scroll position
Created attachment 577468 [details] [diff] [review]
Ensure viewport is correct for new tab

This follows on from patch 3 on bug 704950 (https://bug704950.bugzilla.mozilla.org/attachment.cgi?id=577466)
Attachment #577468 - Flags: review?(chrislord.net)

Comment 8

6 years ago
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.
https://hg.mozilla.org/projects/birch/rev/48c9e2c635e8
Status: NEW → RESOLVED
Last Resolved: 6 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+
status-firefox11: --- → fixed
You need to log in before you can comment on or make changes to this bug.