question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Menu] open causes vertical scrollbar to disappear

See original GitHub issue

Problem description

Open any menu, and the browser vertical scrollbar disappears. This is really disorienting for my case where I have a right aligned appbar #avatar that opens a small menu (it bounces the screen).

It seems that when the menu opens, <body> changes to <body style="overflow: hidden; padding-right: 15px;">

Steps to reproduce

next branch, menus demo http://localhost:3000/#/component-demos/menus

  1. Observe the vertical scroll bar
  2. Open a menu
  3. Observe the vertical scroll bar is missing

Versions

next branch a38068f90c28ee240f0622d40a87f6d888dd74e2

  • Browser: Mac Chrome 52.0.2743.116
  • Browser: Mac Firefox 47.0.1
  • Browser: Mac Firefox 48.0.2
  • Browser: Mac Safari 9.1.2

Images

Scrollbar before opening menu

material_ui

No scrollbar after opening menu

material_ui

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
mehrdad-shokricommented, Sep 24, 2019

@oliviertassinari I still have the exact problem on v4

7reactions
DanielJerrehiancommented, Jun 27, 2022

This comment hepled me. I hope it will be a fix for everyone https://stackoverflow.com/a/71671897

Adding disableScrollLock={true} to my Menu component did the trick for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Material UI - Menu Component locks body scrollbar
I have made a dropdown menu using Material-ui Menu component. The problem is once that dropdown menu is open, the body scrollbar disappears...
Read more >
Windows Tip: How To Stop The Disappearing Scroll Bar
If the vertical scroll bar disappears completely in Word, check File / Options / Advanced. Make sure the box is checked to Show...
Read more >
Why Does the Scroll Bar Disappear on Some Web Pages?
This action causes a horizontal scroll bar to appear because page content can't fit in such a narrow space. Clicking the browser window's...
Read more >
Fix: Chrome Scrollbar Disappears - Appuals.com
What causes the Chrome scrollbar to disappear? ... Open Google Chrome; Type chrome://extensions/ in the address bar and press Enter.
Read more >
Show scroll bars in Word or Excel - Microsoft Support
Click File > Options. On the Advanced tab, scroll to the Display section. Select Show horizontal scroll bar and Show vertical scroll bar,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found