Skip to content

Commit

Permalink
Fix brave/brave-ios#7737: Crash at Browsing Mode Change while drag-dr…
Browse files Browse the repository at this point in the history
…op action in Tab Tray (brave/brave-ios#7778)

Adding check for active drag and drop while mode change
  • Loading branch information
soner-yuksel authored Jul 25, 2023
1 parent 19e28b8 commit ed4446a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,12 @@ class TabTrayController: LoadingViewController {

@objc func togglePrivateModeAction() {
tabTraySearchController.isActive = false

// Mode Change action disabled while drap-drop is active
// Added to prevent Diffable Data source crash
if tabTrayView.collectionView.hasActiveDrag || tabTrayView.collectionView.hasActiveDrop {
return
}

// Record the slected index before private mode navigation
if !privateMode {
Expand Down

0 comments on commit ed4446a

Please sign in to comment.