File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ class MDLayoutViewController extends UIViewController {
282
282
if ( ! owner ) {
283
283
return ;
284
284
}
285
- if ( ! owner . parent ) {
285
+ if ( ! owner . isLoaded ) {
286
286
owner . callLoaded ( ) ;
287
287
}
288
288
// Unify translucent and opaque bars layout
@@ -366,6 +366,8 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
366
366
Trace . write ( 'Parent page is not part of the window hierarchy.' , Trace . categories . ViewHierarchy , Trace . messageType . error ) ;
367
367
return ;
368
368
}
369
+
370
+ this . parent = Application . getRootView ( ) ;
369
371
this . _setupAsRootView ( { } ) ;
370
372
371
373
this . _commonShowNativeBottomSheet ( parentWithController , options ) ;
@@ -390,8 +392,6 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
390
392
391
393
this . viewController = controller ; // store the viewController so that safeArea overflow is applied correctly
392
394
}
393
- // calling this before the controller set makes it fail. Would have to investigate this
394
- this . parent = Application . getRootView ( ) ;
395
395
396
396
this . _raiseShowingBottomSheetEvent ( ) ;
397
397
const bottomSheet = ( this . bottomSheetController = MDCBottomSheetController . alloc ( ) . initWithContentViewController ( controller ) ) ;
You can’t perform that action at this time.
0 commit comments