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 {
282282 if ( ! owner ) {
283283 return ;
284284 }
285- if ( ! owner . parent ) {
285+ if ( ! owner . isLoaded ) {
286286 owner . callLoaded ( ) ;
287287 }
288288 // Unify translucent and opaque bars layout
@@ -366,6 +366,8 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
366366 Trace . write ( 'Parent page is not part of the window hierarchy.' , Trace . categories . ViewHierarchy , Trace . messageType . error ) ;
367367 return ;
368368 }
369+
370+ this . parent = Application . getRootView ( ) ;
369371 this . _setupAsRootView ( { } ) ;
370372
371373 this . _commonShowNativeBottomSheet ( parentWithController , options ) ;
@@ -390,8 +392,6 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
390392
391393 this . viewController = controller ; // store the viewController so that safeArea overflow is applied correctly
392394 }
393- // calling this before the controller set makes it fail. Would have to investigate this
394- this . parent = Application . getRootView ( ) ;
395395
396396 this . _raiseShowingBottomSheetEvent ( ) ;
397397 const bottomSheet = ( this . bottomSheetController = MDCBottomSheetController . alloc ( ) . initWithContentViewController ( controller ) ) ;
You can’t perform that action at this time.
0 commit comments