-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Snackbar] Fix hidden overlay blocking interactions regression #25739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can probably keep the |
@MieleVL you would also need these changes diff --git a/packages/material-ui/src/Snackbar/Snackbar.js b/packages/material-ui/src/Snackbar/Snackbar.js
index 25ba683a1e..aa60de00eb 100644
--- a/packages/material-ui/src/Snackbar/Snackbar.js
+++ b/packages/material-ui/src/Snackbar/Snackbar.js
@@ -68,6 +68,8 @@ const SnackbarRoot = experimentalStyled(
...(styleProps.anchorOrigin.horizontal === 'left' && { justifyContent: 'flex-start' }),
...(styleProps.anchorOrigin.horizontal === 'right' && { justifyContent: 'flex-end' }),
[theme.breakpoints.up('sm')]: {
+ right: 'unset',
+ left: 'unset',
...(styleProps.anchorOrigin.vertical === 'top' ? { top: 24 } : { bottom: 24 }),
...(styleProps.anchorOrigin.horizontal === 'center' && center),
...(styleProps.anchorOrigin.horizontal === 'left' && { left: 24, right: 'auto' }), |
Since it's a regression from #25142, another alternative would be to add the CSS properties we changed in the PR. cc @m4theushw |
If we want to restore the pre-migration to emotion effort (and fix the issue), it seems enough to apply this on HEAD: diff --git a/packages/material-ui/src/Snackbar/Snackbar.js b/packages/material-ui/src/Snackbar/Snackbar.js
index b71e6d535c..8903eb3d3a 100644
--- a/packages/material-ui/src/Snackbar/Snackbar.js
+++ b/packages/material-ui/src/Snackbar/Snackbar.js
@@ -56,8 +56,8 @@ const SnackbarRoot = experimentalStyled(
const left = { justifyContent: 'flex-start' };
const top3 = { top: 24 };
const bottom3 = { bottom: 24 };
- const right3 = { right: 24 };
- const left3 = { left: 24 };
+ const right3 = { left: 'auto', right: 24 };
+ const left3 = { left: 24, right: 'auto' };
const center = {
left: '50%',
right: 'auto', which is almost the initial proposal (without the simplification, yes, we can remove the indirections 👍) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #25737
Preview: https://deploy-preview-25739--material-ui.netlify.app/components/snackbars/