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.

Bug: issue related to overflow menu item's z-index and position

See original GitHub issue

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Overflow menu seems to work correctly in storybook only. When using it with the outer frame of CP4S platform, we got the following issues.

  • Wrong position of OverflowMenu items and scrolling up the whole page while clicking on OverflowMenu 圖片 For the click and scrolling issue, you may check the attached demo video.

overflow-menu-click-and-scroll.gif.zip

  • Z-index of OverflowMenu items being set too high. It should be covered by the top gradient of the platform frame. 圖片

  • Scrolling data table also makes the position of overflow menu items in other component changing… For scrolling A but also got B scrolling issue, you may check the attached demo video. scroll a but also affect b.gif.zip

Is this issue related to a specific component? OverflowMenu component

What did you expect to happen? What happened instead? What would you like to see changed?

  • OverflowMenu items being placed correctly.
  • Clicking on overflow menu button won’t automatically scroll up the whole web page.
  • Z-index of OverflowMenu items being calculated dynamically so we can have OverflowMenu items hidden behind top gradient of platform frame when scrolling up the web page.
  • Scrolling on A component shouldn’t change the position of OverflowMenu items of B component.

What browser are you working in? FireFox, Chrome

What version of the Carbon Design System are you using?

"carbon-components": "10.23.2"
"carbon-components-react": "7.23.2"

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Steps to reproduce the issue

  1. Step one
  2. Step two
  3. Step three
  4. etc.

Please create a reduced test case in CodeSandbox

Additional information

  • Screenshots or code
  • Notes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
emyarodcommented, Nov 30, 2020

this should be resolved in #7323

1reaction
SimonFinneycommented, Nov 20, 2020

Thanks @emyarod! That solution resolves the original issue with scrolling, but it looks like this has its own implications 😭

  1. Open and close the first OverflowMenu:
Initial
  1. Scroll and re-open the first OverflowMenu:
Scroll
Read more comments on GitHub >

github_iconTop Results From Across the Web

4 reasons your z-index isn't working (and how to fix it)
Check that the elements have their position set and z-index numbers in the correct order. Make sure that you don't have parent elements...
Read more >
dropdown z-Index Issue - Stack Overflow
I am having an issue with the dropdown menu on this site. as you see the dropdown showing behind the contents. I added...
Read more >
Using z-index - CSS: Cascading Style Sheets - MDN Web Docs
The z-index property can be specified with an integer value (positive, zero, or negative), which represents the position of the element ...
Read more >
z-index - CSS-Tricks
The z-index property in CSS controls the vertical stacking order of elements that overlap. As in, which one appears as if it is...
Read more >
Why your z-index isn't working - DEV Community ‍ ‍
You might be working on an existing codebase that had the z-index of an element set to 999 (for example). This would affect...
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