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.

Dropdown menu appears behind bootstrap 4 modal

See original GitHub issue

I’m submitting a …

[x ] bug report 

Current behavior

I am using Bootstrap 4. My use case is putting a tag-input (with a tag-input-dropdown) within a bootsrap modal window.

Since the DropdownMenu z-index is set as 100 and the bootstrap’s modal z-index is set to more than 1000, the dropdown menu actually appears behing the modal (see screenshot below) screen shot 2017-11-24 at 11 00 32

Expected behavior

The dropdownmenu should appear in front of the modal.

I am new to angular, but I guess there are two ways to solve this:

  1. Simply set the z-index to a much higher value (2000?)
  2. Allow to configure the dropdown menu z-index if needed (I believe not everyone wants to add a tag-input into a modal)

Minimal reproduction of the problem with instructions (if applicable)

Put a tag-input containing a dropdown menu withing a bootstrap 4 modal

What do you use to build your app?. Please specify the version

Webback

Angular version: Angular 5

ngx-chips version:

Latest (1.5.10)

Browser:

I am using chrome 62, but I guess this affects all browsers…

Issue Analytics

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

github_iconTop GitHub Comments

8reactions
molot1989commented, Dec 2, 2017

I fixed it in styles.scss file added

ng2-dropdown-menu { z-index: 9999!important; .ng2-dropdown-menu { z-index: 9999!important; ng2-menu-item { z-index: 9999!important; } } }

5reactions
Gbuompriscocommented, Apr 3, 2018

Check out the option [zIndex] in version 1.7.5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chosen dropdown within Bootstrap modal is hidden behind ...
I have a select element that uses chosen. When the chosen select drops down, it is cut off by the modal footer. I...
Read more >
Dropdowns - Bootstrap
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown ...
Read more >
Bug - autocomplete dropdown lists now z-indexed behind modal
I finally updated from 3.2 to 3.7.1, and now all autocomplete dropdown lists appear behind the modals they are in. You guys really...
Read more >
Bootstrap 4 Dropdowns - W3Schools
Add the .dropdown-menu class to a <div> element to actually build the dropdown menu. Then add the .dropdown-item class ...
Read more >
Bootstrap Modal Dialog showing under Modal Background
The easiest solution is to move the modal dialog outside of any container and just declare it under the <body> element, or -...
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