Skip to content

Commit

Permalink
Merge pull request #452 from nativescript-community/fix-ios-bottomshe…
Browse files Browse the repository at this point in the history
…et-close-on-tap-in-background

fix(bottomSheet): ios viewController undefined on tap in background
  • Loading branch information
farfromrefug authored Nov 14, 2023
2 parents 9063f9e + aa6d9c2 commit 9f53845
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 250 deletions.
2 changes: 1 addition & 1 deletion demo-vue3
3 changes: 2 additions & 1 deletion src/bottomsheet/bottomsheet.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,11 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
if (this.isLoaded) {
this.callUnloaded();
}

this._onDismissBottomSheetCallback && this._onDismissBottomSheetCallback();
// it is very important to clear the viewController as N does not do it
// and the destroy of the view from svelte could trigger a layout pass on the viewController
this.viewController = null;
this._onDismissBottomSheetCallback && this._onDismissBottomSheetCallback();
}
}

Expand Down
Loading

0 comments on commit 9f53845

Please sign in to comment.