authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-17 16:29:20-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-17 16:29:20-07:00
log4cc984fedc33184c0a0fb67ea17fb02902ae2224
treeac0fcc3f5fa2357c5a2189453a1e2b505e81aa2f
parente26af33b228792bb72349ca4e849a96381578a57
signature Signed by PGP key B5690EEEBB952194

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


1 files changed, 4 insertions(+), 0 deletions(-)

apps/web/src/browser/BrowserSurfaceSlot.tsx+4
...@@ -64,6 +64,10 @@ export function BrowserSurfaceSlot(props: {...@@ -64,6 +64,10 @@ export function BrowserSurfaceSlot(props: {
64 update();64 update();
65 const observer = new ResizeObserver(update);65 const observer = new ResizeObserver(update);
66 observer.observe(element);66 observer.observe(element);
67 // Inline panels animate their outer width while keeping the content at
68 // full width. The slot moves without resizing, so measure on shell resizes too.
69 const panel = element.closest('[data-preview-panel-mode="inline"]');
70 if (panel) observer.observe(panel);
67 window.addEventListener("resize", update);71 window.addEventListener("resize", update);
68 window.addEventListener("scroll", update, true);72 window.addEventListener("scroll", update, true);
69 return () => {73 return () => {