Skip to content

[website] Fix layout shift on homepage #46461

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Jun 30, 2025

  1. open https://mui.com/
  2. click on Search
  3. Notice layout shift in the background

This PR fixes layout shifting caused by algolia modal

@sai6855 sai6855 marked this pull request as draft June 30, 2025 17:39
@sai6855 sai6855 added website Pages that are not documentation-related, marketing-focused. enhancement This is not a bug, nor a new feature labels Jun 30, 2025
@mui-bot
Copy link

mui-bot commented Jun 30, 2025

Netlify deploy preview

https://deploy-preview-46461--material-ui.netlify.app/

Bundle size report

Bundle Parsed Size Gzip Size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 682560b

ref={() => {
const html = document.querySelector('html');
if (html) {
html.style.overflow = 'hidden';
Copy link
Contributor Author

@sai6855 sai6855 Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternate way is remove margin-right:15px added by Algolia

 const body = document.querySelector('body');
     if (body) {
        body.style.marginRight = '';
  }

@sai6855 sai6855 marked this pull request as ready for review June 30, 2025 18:07
@sai6855 sai6855 requested a review from siriwatknp June 30, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature website Pages that are not documentation-related, marketing-focused.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants