TabController: More sensible next tab auto-selection
This commit is contained in:
@@ -609,12 +609,8 @@ class BrowserViewController: UIViewController, WKNavigationDelegate, WKUIDelegat
|
||||
}
|
||||
|
||||
func tabPicker(_ picker: TabPickerViewController, willCloseTab tab: Tab) {
|
||||
// If closed tab is current tab, pick another one.
|
||||
// Dismiss picker if current tab is closed using the picker
|
||||
if tab == self.tab {
|
||||
if let nextTab = tabController.tabs.last(where: { $0 != tab }) {
|
||||
self.tab = nextTab
|
||||
}
|
||||
|
||||
picker.dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user