diff --git a/src/embed/app.ts b/src/embed/app.ts index aed696fc..3be949de 100644 --- a/src/embed/app.ts +++ b/src/embed/app.ts @@ -627,7 +627,7 @@ export class AppEmbed extends V1Embed { }; private setIframeHeightForNonEmbedLiveboard = (data: MessagePayload) => { - const { height: frameHeight, ...restParams } = this.viewConfig.frameParams || {}; + const { height: frameHeight } = this.viewConfig.frameParams || {}; const liveboardRelatedRoutes = [ '/pinboard/', diff --git a/src/embed/liveboard.ts b/src/embed/liveboard.ts index db2a6712..e94e0f89 100644 --- a/src/embed/liveboard.ts +++ b/src/embed/liveboard.ts @@ -560,13 +560,24 @@ export class LiveboardEmbed extends V1Embed { }; private setIframeHeightForNonEmbedLiveboard = (data: MessagePayload) => { - if ( - data.data.currentPath.startsWith('/embed/viz/') - || data.data.currentPath.startsWith('/embed/insights/viz/') - ) { + const { height: frameHeight } = this.viewConfig.frameParams || {}; + + const liveboardRelatedRoutes = [ + '/pinboard/', + '/insights/pinboard/', + '/schedules/', + '/embed/viz/', + '/embed/insights/viz/', + '/liveboard/', + '/insights/liveboard/', + ]; + + if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) { + // Ignore the height reset of the frame, if the navigation is + // only within the liveboard page. return; } - this.setIFrameHeight(this.defaultHeight); + this.setIFrameHeight(frameHeight || this.defaultHeight); }; private setActiveTab(data: { tabId: string }) {