material icon indicating copy to clipboard operation
material copied to clipboard

Alert dialog over a md-autocomplete template overlaps one with the other

Open FabVillegas opened this issue 11 years ago • 3 comments

Here, I have a normal autocomplete. I added a method when an item is not found that enables the user to add the query text to a database for future searches.

image

Afterwards, a dialog confirms that the query text is uploaded, but surprise, the dialogs mess up each other.

image

I just want to point out this problem.

I think this is just a problem related to the z-index properties.

.md-virtual-repeat-container.md-autocomplete-suggestions-container {
    position: absolute;
    box-shadow: 0 2px 5px rgba(0,0,0,.25);
    height: 225.5px;
    max-height: 225.5px;
    z-index: 80;
}

Modifying the value to 80 let the dialog go over the autocomplete template. The original value being z-index: 100.

Also, the md-dialog-container has originally a value of z-index: 80

.md-dialog-container {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 80;
    overflow: hidden;
}

Modyfing the value of the md-dialog-container to 101 bugs the autocomplete template

image

I would say to decrease the z-index of the md-autocomplete template instead as a quick fix.

FabVillegas avatar Oct 30 '15 01:10 FabVillegas

Did you tried it with HEAD? there was a commit (f5166dd) that changed the z-indices so if you didn't please check.

EladBezalel avatar Oct 30 '15 10:10 EladBezalel

I'm currently using HEAD. I checked, it appears there is a new one..."1.0.0-rc2". Will update and check changes.

My previous version.

{
  "name": "angular-material",
  "version": "1.0.0-rc1-master-6b18ad1",
  "ignore": [],
  "dependencies": {
    "angular": "^1.3.0 || >1.4.0-beta.0",
    "angular-animate": "^1.3.0 || >1.4.0-beta.0",
    "angular-aria": "^1.3.15 || >1.4.0-beta.0"
  },
  "main": [
    "angular-material.js",
    "angular-material.css"
  ]
}

FabVillegas avatar Oct 30 '15 16:10 FabVillegas

This issue is closed as part of our ‘Surge Focus on Material 2' efforts. For details, see our forum posting @ http://bit.ly/1UhZyWs.

ThomasBurleson avatar Jun 02 '16 13:06 ThomasBurleson