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.

AutoComplete Suggestions Panel Appears behind Modal

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

md-autocomplete suggestions panel appears above the modal it resides in.

What is the current behavior?

md-autocomplete suggestions panel appears behind the modal it resides in, despite attempts to manipulate z-index.

What are the steps to reproduce?

Use an auto-complete container inside of any kind of modal popup.

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/material”: “2.0.0-beta.7”, Chrome

Is there anything else we should know?

I’m trying to add an autocomplete field to a boostrap modal i have, but when typing the suggestions box appears behind the modal and out of view for the user.

I’ve tried the following:

.mat-autocomplete-panel {
    position: fixed !important;
    z-index:100000 !important;
}

But I didn’t find any success, has anyone had any luck moving the suggestions box to the front? Happens with any type of modal, not just bootstrap.

Image:

Example

StackOverflow:

https://stackoverflow.com/questions/44950374/angular-material-2-0-autocomplete-suggestions-panel-appears-behind-bootstrap-m

Issue Analytics

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

github_iconTop GitHub Comments

8reactions
xyfercommented, Apr 30, 2018

@amittrehan44

/deep/ .cdk-overlay-container { z-index: 9999; }

This worked for me in my Angular 4 app.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 10, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular material autocomplete results list is displaying behind ...
i am using material because it gives angular version of auto-complete. – Fahad Subzwari · Good! try the solution and let me know...
Read more >
Jquery autocomplete showing behind modal
The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java...
Read more >
Why mat autocomplete not showing in bootstrap modal?
Material design in angular isn't built to work together with Bootstrap. You can use Material's dialog module or need to do some hack...
Read more >
Autocomplete visualization in modal
Hi,. I have a visualization problem with autocomplete: I added it in a modal popup, but when I type something in the input...
Read more >
Html – AJAX Control Toolkit auto-complete appearing behind ...
The control sits inside an asp:Panel linked to a ModalPopupExtender from the toolkit. Everything works beautifully in the latest generations of IE9, FF...
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