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.

Z-index issue on ngb-dropdown with container="body"

See original GitHub issue

Bug description:

  • Z-index is wrong when ngb-dropdown is loaded in a modal and container="body"

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/ngb-dropdown-index

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 7.0.0 ng-bootstrap: 4.1.0

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
xyrintechcommented, Apr 22, 2019

Any update for this?

2reactions
shyamal890commented, Mar 13, 2019

@benouat Needed if you have a scrollable div in the modal!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ng bootstrap dropdown not in front - Stack Overflow
I solved it by placing relative and absolute containers around the dropdown, and applying z-index inside the dropdown:
Read more >
Dropdown - Angular powered Bootstrap
Useful mainly when dropdown is attached to the body. If the dropdown is inline just use <div ngbDropdown class="custom-class"> instead. Type: string.
Read more >
Diagnosis: z-index (submenu hidden behind content)
z -index values are relative to their element's siblings only; outside of that parent container, they have no effect. So if Element B...
Read more >
Z-index · Bootstrap v5.0
While not a part of Bootstrap's grid system, z-indexes play an important part in how our components overlay and interact with one another....
Read more >
Fix dropdowns z-index · 8b57efbf1b - PeerTube - Rita Git
Fix dropdowns z-index ... <ng-container *ngFor="let actions of getActions()"> ... <div *ngIf="owned" class="more dropdown-root" ngbDropdown ...
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