Closed Bug 631038 Opened 13 years ago Closed 13 years ago

mobile-optimized pages is half-sized when reloading in portrait mode

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(fennec2.0+)

VERIFIED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: aakashd, Assigned: mbrubeck)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files)

Attached image bug screenshot
Steps to Reproduce:
1. Change your user agent to Mozilla/5.0 (macintosh; U; Intel Mac OS X 10.5; en-US rv:1.9.2.5) Gecko/20100614 Firefox/3.6.5pre Fennec/1.1
2. Go to input.stage.mozilla.com/feedback while in portrait mode (if you're using a desktop build, re-size the browser window to look like portrait mode)

Actual Results:
The page is half the size of the viewable area

Expected Results:
The page fits the entire size of the viewable area.
Assignee: nobody → ryan
Attached image new bug screenshot!
Now its half horizontally
I don't have a way to duplicate this problem.  Fred is taking a look at this on his Android phone at the moment.
I can't reproduce the half-size problem: On my Nexus S, the page shows up with the correct width. Only after submitting, I end up on the thank-you page but not at the top of the screen (I end up being half-way scrolled down like I was before clicking submit).

Further, the language picker ends up somehow next to the title bar somehow. I'll add that to bug 631673.
This looks like a Fennec bug.  I've seen this intermittently on a variety of pages, not just the mobile input page.
Assignee: ryan → mbrubeck
Status: NEW → ASSIGNED
Component: Input → General
Product: Webtools → Fennec
QA Contact: input → general
Target Milestone: 3.1 → ---
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0+
I found steps to reproduce:
1. Open a page with width=device-width, e.g. http://people.mozilla.com/~mbrubeck/test/hello.html
2. Press reload.
Keywords: testcase
Summary: mobile feedback page is half-sized when loading in portrait mode → mobile-optimized pages is half-sized when reloading in portrait mode
Reloading causes a "pagehide" event, and browser.onPageHide() sets the scale to 1, causing this effect.
Blocks: 626873
Keywords: regression
No longer blocks: 626873
Attached patch patchSplinter Review
I think we can just remove this code - there's no great reason to set scale to 1.0 here - especially since 1.0 is below the minimum zoom level on many pages, and causes the views shown in the attached screenshots.

This code was moved to the "pagehide" listener in bug 598111.  Before that, we set scale=1 on location change.  Neither of these should be necessary in the binding, since the front-end (browser.js) resets the zoom level on navigation anyway.
Attachment #511831 - Flags: review?(ben)
Comment on attachment 511831 [details] [diff] [review]
patch

Hm. I'd prefer if we did this the other way: no more resetting zoom in browser.js and make resetting zoom level part of the browser binding; it seems like something the browser should take care of. However, all the meta viewport code is in browser.js, so this makes sense to me.
Attachment #511831 - Flags: review?(ben) → review+
http://hg.mozilla.org/mobile-browser/rev/c0f28968a38e

We should definitely move all meta-viewport and zoom limit handling into the browser binding in toolkit long-term, so that future Mozilla apps can use it too.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Depends on: 640997
verified FIXED on builds:
Mozilla/5.0 (Android; Linux armv71; rv:2.0b13pre) Gecko/20110317 Firefox/4.0b13pre Fennec/4.0b6pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: