nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
216 stars 80 forks source link

[BottomSheet][iOS] App crashes when tapping background or drag to close bottom sheet #453

Closed fpaaske closed 10 months ago

fpaaske commented 10 months ago

Which platform(s) does your issue occur on?

And it only happens for plugin version 7.2.7 and newer.

Please, provide the following version numbers that your issue occurs with:

{
  "name": "ns-ng-bottom-sheet-test",
  "main": "./src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~16.2.0",
    "@angular/common": "~16.2.0",
    "@angular/compiler": "~16.2.0",
    "@angular/core": "~16.2.0",
    "@angular/forms": "~16.2.0",
    "@angular/platform-browser": "~16.2.0",
    "@angular/platform-browser-dynamic": "~16.2.0",
    "@angular/router": "~16.2.0",
    "@nativescript-community/ui-material-bottomsheet": "7.2.9",
    "@nativescript/angular": "^16.0.0",
    "@nativescript/core": "~8.6.0",
    "@nativescript/theme": "~3.0.2",
    "rxjs": "~7.8.0",
    "zone.js": "~0.13.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~16.2.0",
    "@angular/compiler-cli": "~16.2.0",
    "@nativescript/ios": "8.6.3",
    "@nativescript/preview-cli": "1.0.5",
    "@nativescript/types": "~8.6.0",
    "@nativescript/webpack": "~5.0.18",
    "@ngtools/webpack": "~16.2.0",
    "typescript": "~5.1.6"
  }
}

Please, tell us how to recreate the issue in as much detail as possible.

  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Uncaught TypeError: Cannot read properties of null (reading 'nsAnimated')
   at
    _hideNativeBottomSheet(file: src/webpack:/ns-ng-bottom-sheet-test/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet.ios.js:385:0)
    at _closeBottomSheetCallback(file: src/webpack:/ns-ng-bottom-sheet-test/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet-common.js:75:0)
    at _onDismissBottomSheetCallback(file: src/webpack:/ns-ng-bottom-sheet-test/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet-common.js:52:0)
    at _unloadBottomSheet(file: src/webpack:/ns-ng-bottom-sheet-test/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet.ios.js:395:0)
    at MDCBottomSheetControllerDelegateImpl.bottomSheetControllerDidDismissBottomSheet(file: src/webpack:/ns-ng-bottom-sheet-test/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet.ios.js:46:0)
vallemar commented 10 months ago

@fpaaske this should be fix when release this pr https://github.com/nativescript-community/ui-material-components/pull/452

farfromrefug commented 10 months ago

@fpaaske @vallemar it is released

fpaaske commented 10 months ago

Thanks, I tested and can confirm it's fixed! Great work @vallemar @farfromrefug !