Skip to content

Commit cbd325c

Browse files
committed
fix(bottomsheet,ios): allow to read root css variables from bottomsheet
1 parent 3ab0d0f commit cbd325c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bottomsheet/bottomsheet.ios.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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));

0 commit comments

Comments
 (0)