Closed Bug 1270865 Opened 10 years ago Closed 10 years ago

Top sites are not correctly displayed after changing device orientation

Categories

(Firefox for iOS :: General, defect)

All
iOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Tracking Status
fxios 5.0+ ---
fxios-v4.0 --- affected
fxios-v5.0 --- verified

People

(Reporter: SimonB, Assigned: bmunar)

Details

Attachments

(4 files)

Attached image Screenshot of the issue
Build 4.0.0b7 Steps to reproduce; 1. Launch Firefox 2. Open Tabs tray 3. Open 6 new tabs 4. Close 3 tabs by swiping all three at the same time 5. Change device orientation 6. Open a new tab by pressing the + button from tabs tray Actual results: - The top default sites are not correctly displayed Expected results: - The defaults sites should be correctly displayed
Can this be reproduced in fewer steps (i.e. can this be repod more easily)
Rank: 4
Flags: needinfo?(simion.basca)
On latest master running on iPhone 6 Plus (9.3.1) the issue is reproducible when: 1. Open 3 tabs in portrait 2. Swipe off two of them with a single gesture 3. Rotate to landscape 4. Open a new tab
Flags: needinfo?(simion.basca)
That latest screenshot is awful. We should fix this.
Assignee: nobody → bmunar
Status: NEW → ASSIGNED
Attached file PR
Attachment #8753413 - Flags: review?(bnicholson)
Did you check that this doesn't cause the top sites panel to flicker when switching panels? That issue seems to appear every time the refresh logic is changed.
Flags: needinfo?(bmunar)
I did check and as far as I can tell, it didn't show the flicker of the empty state in all the cases I tried to execute. Also, that empty state code has to do with querying the dataSource.count(), and collection.reloadData() doesn't affect whether or not the empty state will appear or not.
Flags: needinfo?(bmunar)
Comment on attachment 8753413 [details] [review] PR Alternate STR: 1) Open the home panel in portrait. 2) Tap the tabs button. 3) Rotate the phone to landscape. 4) Tap the new tab button at the bottom. I don't think the fix for this should be to throw another reloadData() call into TopSitesPanel since we already do this in viewWillTransitionToSize. This bug happens only on new tabs, but not when returning to an existing home panel tab, so I think the bug should address what's going wrong in that particular situation instead. Digging into this, I found that this is a regression from bug 1263974. didCommitNavigation is fired for the new tab, which calls updateUIForReaderHomeStateForTab, which calls scrollController.showToolbars, which updates the home panel layout as a side effect. A better fix, I think, would be to change showToolbars() to not trigger an animation in the first place if the UI is already in the state being animated to. That is, do nothing in showToolbars if toolbarState == .Visible already (and similar idea for hideToolbars).
Attachment #8753413 - Flags: review?(bnicholson) → review-
Attachment #8753413 - Flags: review- → review?(bnicholson)
Attachment #8753413 - Flags: review?(bnicholson) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.0
The top sites are correctly displayed after changing device orientation on build 3c8f33c5.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: