Skip to content

Commit

Permalink
Scroll to selected tab after inserting to ensure that it is visible (#…
Browse files Browse the repository at this point in the history
…642)

Task/Issue URL: https://app.asana.com/0/0/1202608828742665/f

Description:
If the item was inserted outside of collection's visible content rect, the collection needs
an explicit API call to scroll to reveal it.
  • Loading branch information
ayoy authored Jul 18, 2022
1 parent 8261ae1 commit 3c24b73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions DuckDuckGo/Tab Bar/View/TabBarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ extension TabBarViewController: TabCollectionViewModelDelegate {
collectionView.animator().insertItems(at: indexPathSet)
if selected {
collectionView.selectItems(at: indexPathSet, scrollPosition: .centeredHorizontally)
collectionView.scrollToSelected()
}

updateTabMode()
Expand Down

0 comments on commit 3c24b73

Please sign in to comment.