Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep browser pages aligned during panel animations #12329

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/12329/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 4 additions and 0 deletions.

x
0 of 1 viewed, 1 left
4 additions and 0 deletionsapps/web/src/browser/BrowserSurfaceSlot.tsxModified
View file
@@ -64,6 +64,10 @@
update();
const observer = new ResizeObserver(update);
observer.observe(element);
+ // Inline panels animate their outer width while keeping the content at
+ // full width. The slot moves without resizing, so measure on shell resizes too.
+ const panel = element.closest('[data-preview-panel-mode="inline"]');
+ if (panel) observer.observe(panel);
window.addEventListener("resize", update);
window.addEventListener("scroll", update, true);
return () => {