Open Bug 1463058 Opened 6 years ago Updated 2 years ago

maps.google.com not resizing properly after switching orientation from landscape to portrait

Categories

(Firefox for iOS :: General, defect, P3)

Other
iOS
defect

Tracking

()

Tracking Status
fxios 12.0 ---
fxios-v11.0 --- affected
fxios-v12.0 --- affected

People

(Reporter: csuciu, Unassigned)

Details

Attachments

(1 file)

v12.0 (10757)
iPhone 8 Plus (11.3)

1. Put the device in landscape.
2. Visit maps.google.com.
3. Switch to portrait.

Result: The page is not properly resized (see the screenshot).

This is working fine in Chrome.
Assignee: nobody → jdarcangelo
Status: NEW → ASSIGNED
Priority: -- → P3
I've created the following JSBin for testing the result of observing the `window.onresize` event when rotating the device orientation:

http://output.jsbin.com/regipul

Starting in portrait orientation, then rotating to landscape and back to portrait, I've observed the following results:

Firefox:
1.) Portrait  - 375x545
2.) Landscape - 375x319
3.) Portrait  - 375x319

Safari:
1.) Portrait  - 375x553
2.) Landscape - 667x375
3.) Portrait  - 375x553

Chrome:
1.) Portrait  - 375x591
2.) Landscape - 667x299
3.) Portrait  - 375x591

Minimal WKWebView App (WITH Autolayout):
1.) Portrait  - 375x603
2.) Landscape - 375x343
3.) Portrait  - 375x343

Minimal WKWebView App (WITHOUT Autolayout):
1.) Portrait  - 375x603
2.) Landscape - 667x311
3.) Portrait  - 375x603

As seen in these results, both Firefox and the minimal WKWebView app using Autolayout are reporting incorrect window sizes after the `resize` event fires on the page. By altering the minimal WKWebView app to NOT use Autolayout, the problem goes away. We also believe that both Safari and Chrome are not using Autolayout for the WKWebView which would also support this notion that Autolayout is breaking the `resize` event in WKWebView. The solution here is to stop using Autolayout for the WKWebView, but this will require a fair bit of refactoring around our scrolling code.

Re-assigning to Farhan as he is far more knowledgeable than myself in UIKit and I immediately regret opening this can of worms :-)
Assignee: jdarcangelo → fpatel
Assignee: fpatel → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: