[Settings] With APZ turned on the wifi panel is sometimes shown instead of the main panel at startup

RESOLVED FIXED

Status

Firefox OS
Gaia::Settings
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: vingtetun, Assigned: vingtetun)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:1.3+, b2g-v1.3 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Seems like there is a race here. The app starts with a viewport of 968px and then is resize to device-width. But this is too late since the rotate callback has already fired and start to load the wifi panel.
Created attachment 8344757 [details] [diff] [review]
Delay a bit the rotation listener
Attachment #8344757 - Flags: review?(arthur.chen)
Comment on attachment 8344757 [details] [diff] [review]
Delay a bit the rotation listener

Review of attachment 8344757 [details] [diff] [review]:
-----------------------------------------------------------------

::: apps/settings/js/settings.js
@@ +800,4 @@
>        console.log('go to default Panel ' + Settings.defaultPanelForTablet);
>        Settings.currentPanel = Settings.defaultPanelForTablet;
>      }
> +

We need to set ScreenLayout (calling to watch) before calling to Settings.isTabletAndLandscape() in which we get layout information from ScreenLayout.
Attachment #8344757 - Flags: review?(arthur.chen)
Created attachment 8345235 [details] [diff] [review]
bug909877.patch

Is it better ?
Attachment #8344757 - Attachment is obsolete: true
Attachment #8345235 - Flags: review?(arthur.chen)
Comment on attachment 8345235 [details] [diff] [review]
bug909877.patch

r=me. Thanks!
Attachment #8345235 - Flags: review?(arthur.chen) → review+
https://github.com/mozilla-b2g/gaia/commit/d1f2320d77bca838ecf560e7ce5bca43c28e887e

This patch needs to land on 1.3.
Status: NEW → RESOLVED
blocking-b2g: --- → 1.3+
Last Resolved: 4 years ago
Resolution: --- → FIXED
Blocks: 949585
No longer blocks: 949585
Duplicate of this bug: 951458
status-b2g-v1.3: --- → fixed

Updated

4 years ago
Assignee: nobody → 21
You need to log in before you can comment on or make changes to this bug.