Skip to content

Commit

Permalink
Temporary workaround for FXIOS-9785 fix (PR 21328 partial revert). (#…
Browse files Browse the repository at this point in the history
…21486) (#21487)

* Temporary workaround for FXIOS-9785 fix (PR 21328 partial revert).

* Added documentation.

(cherry picked from commit 80e5f9f)

Co-authored-by: Isabella <[email protected]>
  • Loading branch information
mergify[bot] and ih-codes authored Aug 8, 2024
1 parent 7041b2c commit d8243a2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3243,6 +3243,7 @@ extension BrowserViewController: TabManagerDelegate {
updateFindInPageVisibility(isVisible: false, tab: previous)
setupMiddleButtonStatus(isLoading: selected?.loading ?? false)

// [FXIOS-9785 Note #2] Back button can't be enabled unless the webView is already initialized
if isToolbarRefactorEnabled {
dispatchBackForwardToolbarAction(selected?.canGoBack, windowUUID, .backButtonStateChanged)
dispatchBackForwardToolbarAction(selected?.canGoForward, windowUUID, .forwardButtonStateChanged)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class TabScrollingController: NSObject, FeatureFlaggable, SearchBarLocationProvi

didSet {
self.scrollView?.addGestureRecognizer(panGesture)
// [FXIOS-9785 Note #3] Toolbar delegate can't be set unless the webView is already initialized
scrollView?.delegate = self
scrollView?.keyboardDismissMode = .onDrag
configureRefreshControl(isEnabled: true)
Expand Down
16 changes: 16 additions & 0 deletions firefox-ios/Client/TabManagement/TabManagerImplementation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,22 @@ class TabManagerImplementation: LegacyTabManager, Notifiable, WindowSimpleTabsPr
private func selectTabWithSession(tab: Tab, previous: Tab?, sessionData: Data?) {
selectedTab?.createWebview(with: sessionData)
selectedTab?.lastExecutedTime = Date.now()

// [FXIOS-9785 Note 1] Workaround to resolve Aug 7, 2024 incident (PR #21486)
// NOTE: This needs more work because the change from PR #21328 fixed another issue,
// and thus couldn't be completely rolled back.
// However, now we are repeating this delegate notification which is less than ideal and may have unexpected
// consequences.
// See ticket for more information.
// Broadcast updates for any listeners
delegates.forEach {
$0.get()?.tabManager(
self,
didSelectedTabChange: tab,
previous: previous,
isRestoring: !tabRestoreHasFinished
)
}
}

// MARK: - Screenshots
Expand Down

1 comment on commit d8243a2

@firefoxci-taskcluster
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! Looks like an error!

InterpreterError at template.tasks[0].extra[0].treeherder[1].symbol: unknown context value cron

Please sign in to comment.