Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(deps): keep base ui's hidden fixed elements out of the viewport (#122488)

Sam Pennington176c88d64371
diff --git a/patches/@[email protected] b/patches/@[email protected]
new file mode 100644
index 000000000000..10cd6b89579e
--- /dev/null
+++ b/patches/@[email protected]
@@ -0,0 +1,24 @@
+diff --git a/visuallyHidden.js b/visuallyHidden.js
+index e7deeaeafbaefba1d838badcea9fafe9afe113e1..78d0b3594568267cc55f152239037ebbef4dc8a9 100644
+--- a/visuallyHidden.js
++++ b/visuallyHidden.js
+@@ -17,7 +17,6 @@ const visuallyHiddenBase = {
+ const visuallyHidden = exports.visuallyHidden = {
+ ...visuallyHiddenBase,
+ position: 'fixed',
+- margin: 0,
+ top: 0,
+ left: 0
+ };
+diff --git a/visuallyHidden.mjs b/visuallyHidden.mjs
+index 6cf2e86d079219c1794ef701546bd6c710782a42..e4abb6ad8dfb9fb8967b2e2d640194412206e148 100644
+--- a/visuallyHidden.mjs
++++ b/visuallyHidden.mjs
+@@ -11,7 +11,6 @@ const visuallyHiddenBase = {
+ export const visuallyHidden = {
+ ...visuallyHiddenBase,
+ position: 'fixed',
+- margin: 0,
+ top: 0,
+ left: 0
+ };
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 54167cfaccbe..e6f7635db42d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -190,6 +190,7 @@ overrides:
patchedDependencies:
'@base-ui/[email protected]': e0be9f964398f2e05b65153968c757a2869a3c5ddc6c2d3a32bf3140a4a8b34f
+ '@base-ui/[email protected]': c25c4734cc997d0eec882b628a0231f91805610478dba85f65a60f0ba6fbb80a
'@connectrpc/[email protected]': a8248109885bda6ff3ce8663332190cabec9ca5da4deab47603ea6b1dbca27c4
[email protected]: 2e3e09d22bbc20d8961e0392c318f12ffada0babb6422f03b5538af8b2707852
[email protected]: d95e6638894935a75bd93b60b5243cb825892a1eedcc4c9a125a3e7dce8b64f0
@@ -26409,7 +26410,7 @@ snapshots:
'@base-ui/[email protected](patch_hash=e0be9f964398f2e05b65153968c757a2869a3c5ddc6c2d3a32bf3140a4a8b34f)(@date-fns/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])':
dependencies:
'@babel/runtime': 7.29.7
+ '@base-ui/utils': 0.5.0(patch_hash=c25c4734cc997d0eec882b628a0231f91805610478dba85f65a60f0ba6fbb80a)(@types/[email protected])([email protected]([email protected]))([email protected])
'@floating-ui/react-dom': 2.1.9([email protected]([email protected]))([email protected])
'@floating-ui/utils': 0.2.12
react: 18.3.1
@@ -26420,7 +26421,7 @@ snapshots:
'@types/react': 18.3.27
date-fns: 4.1.0
+ '@base-ui/[email protected](patch_hash=c25c4734cc997d0eec882b628a0231f91805610478dba85f65a60f0ba6fbb80a)(@types/[email protected])([email protected]([email protected]))([email protected])':
dependencies:
'@babel/runtime': 7.29.7
'@floating-ui/utils': 0.2.12
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index c45898e9a85d..5651df1d389c 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -129,6 +129,9 @@ patchedDependencies:
# A mounted tooltip root must not keep its closed popup's detached DOM alive.
+ # A fixed visually hidden element must sit outside the viewport, or Chrome gives each one its own GPU layer.
+ # Upstream set margin 0 to fix RTL overflow (mui/base-ui#5661), which brought them back inside.
+ '@base-ui/[email protected]': patches/@[email protected]
# Dependencies that require preinstall scripts. Add entries with caution.
allowBuilds: