Skip to content

Commit 0d1e17c

Browse files
committed
Skip size-changed measurement during fullscreen
Hosts determine the container size in fullscreen mode, so size-changed notifications are not needed. The temporary max-content height override used for measurement causes visible vertical jitter during animated fullscreen transitions by briefly reflowing the document on every frame.
1 parent e61e1c2 commit 0d1e17c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/app.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,13 @@ export class App extends Protocol<AppRequest, AppNotification, AppResult> {
12871287
scheduled = true;
12881288
requestAnimationFrame(() => {
12891289
scheduled = false;
1290+
1291+
// Hosts determine the container size in fullscreen, so size-changed
1292+
// notifications are not needed.
1293+
if (this._hostContext?.displayMode === "fullscreen") {
1294+
return;
1295+
}
1296+
12901297
const html = document.documentElement;
12911298

12921299
// Measure actual content height by temporarily overriding html sizing.

0 commit comments

Comments
 (0)