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.

Document MenuList/Popper overflow-y bug

See original GitHub issue

Popper has difficulty calculating positioning when parent has overflow-y: hidden (https://github.com/popperjs/popper-core/issues/535). To fix this, you just have to pass to Popper instance

modifiers: {
  preventOverflow: {
    boundariesElement: 'scrollParent'
  }    
}

To do this in Chakra, you can just do this:

<Menu>
  <MenuButton>{/* .. */}</MenuButton>
  <MenuList
    modifiers={{
      preventOverflow: {
        boundariesElement: "scrollParent"
      }
    }}
  >
    {/* .. */}
  </MenuList>
</Menu>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yasirtrimulabscommented, Aug 3, 2022

Didn’t work for me, any other workaround Screen Shot 2022-08-04 at 3 38 52 AM

0reactions
yasirtrimulabscommented, Aug 11, 2022

@0xlarry I ended up using shorter strings as options so it won’t overflow

Read more comments on GitHub >

github_iconTop Results From Across the Web

overflow - CSS: Cascading Style Sheets - MDN Web Docs
The overflow CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to...
Read more >
Overflow Issues In CSS - Smashing Magazine
In this article, we will explore the causes of overflow issues and how to solve ... An overflow issue occurs when a horizontal...
Read more >
visible; and overflow-y: hidden; causing scrollbar issue
I was trying to make a bunch of dropdown links in a Bootstrap navbar scroll horizontally, but that breaks the dropdowns, which rely...
Read more >
How to prevent overflow scrolling in CSS - LogRocket Blog
What causes the overflow scroll issue? Max viewport width; CSS grid; Not wrapping with Flexbox; Using images without max-width.
Read more >
CSS Overflow - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
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