diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 4ce85b0114..9ab7a91788 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -146,7 +146,7 @@ export default class AppTile extends React.Component { return { initialising: true, // True while we are mangling the widget URL // True while the iframe content is loading - loading: this.props.waitForIframeLoad, + loading: this.props.waitForIframeLoad && !PersistedElement.isMounted(this.persistKey), // Assume that widget has permission to load if we are the user who // added it to the room, or if explicitly granted by the user hasPermissionToLoad: this.hasPermissionToLoad(newProps), @@ -247,6 +247,12 @@ export default class AppTile extends React.Component { this.resetWidget(nextProps); } } + + if (nextProps.widgetPageTitle !== this.props.widgetPageTitle) { + this.setState({ + widgetPageTitle: nextProps.widgetPageTitle, + }); + } } /** diff --git a/src/components/views/elements/PersistedElement.tsx b/src/components/views/elements/PersistedElement.tsx index 8dda530097..d013091803 100644 --- a/src/components/views/elements/PersistedElement.tsx +++ b/src/components/views/elements/PersistedElement.tsx @@ -104,6 +104,10 @@ export default class PersistedElement extends React.Component { } } + static isMounted(persistKey) { + return Boolean(getContainer('mx_persistedElement_' + persistKey)); + } + private collectChildContainer = (ref: HTMLDivElement): void => { if (this.childContainer) { this.resizeObserver.unobserve(this.childContainer);