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.

ability to manually control overlay's z-index

See original GitHub issue

This would be handy for both user created overlays, as well as those used by angular components such as md-menu.

Take this for example http://plnkr.co/edit/AqjYdsScCYPlK9w44aHQ?p=preview you have a fixed element(some sort custom toolbar), inside it you have a button which triggers md-menu, it works fine, but the md-menu-click-catcher, which is for some reason inside the actual md-menu element, is actually stacked above md-overlay-container, causing any attempt to click on the menu items to close the menu(which can be extremely confusing).

  1. md-overlay-container should not have z-index at all, as it renders z-indexes of md-overlay-pane useless
  2. you should be able to manually control z-index of md-overlay-pane

I imagine(at least for the user invoked overlay), it could work either by being able to give the overlay my own identificator(class at least), or being able to set it via OverlayState settings… the former is preferable, as you can then easily switch z-indexes with media queries.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:20
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
meowhuntercommented, Jul 18, 2019

Here is a good example why cdk-overlay-container should not have z-index

z-index

5reactions
angular-robot[bot]commented, Feb 21, 2022

Thank you for submitting your feature request! Looks like during the polling process it didn’t collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular’s scope, we’d encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

z-index issue with overlay not able to click - Stack Overflow
z-index property only works on positioned elements. So try adding position: relative; to your selector.
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 >
The Z-index Property: How to Control Stacking in Your ...
My question is this: Do I need to go into the menu in the custom css and edit the menu so the header...
Read more >
Overlay / ZIndex issue with Menu and Form controls - MSDN
Thank you very much Russ! First off, it works (version from post at Wed, Aug 09 2006 1:18 PM)!. Second, I'm able to...
Read more >
Is there any way to change the "z-index" of an auto-layout child?
(I know I could use an overlay, it would be nice to control the z-index ... I agree, we need to be able...
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