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.

Wrong positioning when overflow-y:hidden is used on parent

See original GitHub issue

Wrong positioning on element that is inside an element with overflow-y: hidden or overflow-x: hidden (but not overflow:hidden).

https://codepen.io/anon/pen/WMNbxv

Result: Popper covers the reference element. Expected: Popper on the left of the reference element.

It works in 1.12.6, but not in any newer version.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
brentertzcommented, Jan 30, 2018

@alecpl Does it work if you adjust the modifiers?

modifiers: {
  preventOverflow: {
    escapeWithReference: true
  }    
}

https://codepen.io/brentertz/pen/RQNZNM?editors=0010

4reactions
alecplcommented, Apr 5, 2018

Ok, from what I see Bootstrap 4 uses:

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

by default. I can fix the issue by setting the boundariesElement to 'window' or 'viewport'. And it’s possible to set this via Bootatrsap’s popover() boundary property. So, I have at least a workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong positioning when overflow-y:hidden is used on parent
Wrong positioning on element that is inside an element with overflow-y: hidden or overflow-x: hidden (but not overflow:hidden).
Read more >
overflow: hidden with relative parent not working
You definitely should put overflow: hidden on the parent element. Then you should set a height to it ...
Read more >
Overflowing content - Learn web development | MDN
This lesson introduced the concept of overflow. You should understand that default CSS avoids making overflowing content invisible.
Read more >
CSS 'position: sticky' not working? Try 'overflow
This post explains the difference between 'overflow: clip' and 'overflow: hidden', and how this can solve problems with 'position: sticky'.
Read more >
Popping Out of Hidden Overflow - CSS-Tricks
Basically, in order for an absolutely positioned element to appear outside of an element with overflow: hidden , its closest positioned ancestor ...
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