Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions packages/core/ui/layouts/root-layout/root-layout-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,20 @@ export class RootLayoutBase extends GridLayout {
);

if (this._shadeCover) {
// Update shade cover with the topmost popupView options (if not specifically told to ignore)
if (this._popupViews.length) {
if (!poppedView?.options?.shadeCover?.ignoreShadeRestore) {
const shadeCoverOptions = this._popupViews[this._popupViews.length - 1].options?.shadeCover;
if (shadeCoverOptions) {
toClose.push(this.updateShadeCover(this._shadeCover, shadeCoverOptions));
}
}
let nextShadeCoverOpts: ShadeCoverOptions;

// Get the topmost popup view options if any
if (this._popupViews.length && !poppedView?.options?.shadeCover?.ignoreShadeRestore) {
nextShadeCoverOpts = this._popupViews[this._popupViews.length - 1].options?.shadeCover;
} else {
nextShadeCoverOpts = null;
}

// Update shade cover with the topmost popupView options if any and if not specifically told to ignore
if (nextShadeCoverOpts) {
toClose.push(this.updateShadeCover(this._shadeCover, nextShadeCoverOpts));
} else {
// Remove shade cover animation if this is the last opened popup view
// Remove shade cover animation otherwise
toClose.push(this.closeShadeCover(poppedView?.options?.shadeCover));
}
}
Expand Down