bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

z-index of typeahead conflicts with modal

Open oliversalzburg opened this issue 11 years ago • 10 comments

When you put a typeahead on an input in a modal and you set typeahead-append-to-body to true, the typeahead is not visible, because the modal has a higher z-index than the typeahead.

oliversalzburg avatar Feb 06 '15 13:02 oliversalzburg

This is not limited to typeahead. popover and tooltip are concerned as well.

RomainLK avatar Feb 06 '15 16:02 RomainLK

+1

telminov avatar Mar 15 '15 07:03 telminov

Im not behind a pc right now. Can you check for me if the zindex is set programatically or do we rely on the Twitter Bootstrap CSS?

If we rely on twbs CSS, there is not much we can do about this.

Can you set up a plunkr demonstrating this issue?

rvanbaalen avatar Mar 15 '15 09:03 rvanbaalen

Here is a plunkr. Issues come when they are appended to body because ui-modal's z-index are calculated:

ng-style="{'z-index': 1050 + index*10, display: 'block'}"

whereas Bootstrap's are fixed:

@zindex-navbar:            1000;
@zindex-dropdown:          1000;
@zindex-popover:           1060;
@zindex-tooltip:           1070;
@zindex-navbar-fixed:      1030;
@zindex-modal-background:  1040;
@zindex-modal:             1050;

RomainLK avatar Mar 17 '15 00:03 RomainLK

+1 with clockpicker and modals.

retorres avatar Apr 02 '15 20:04 retorres

The reason the modal z-index can't be fixed at one constant value is that we added support for multiple modals, so that modals can stack on top of one another.

chrisirhc avatar Apr 06 '15 07:04 chrisirhc

We can change it to index * 5 or something smaller - that would mitigate this issue.

wesleycho avatar Apr 06 '15 13:04 wesleycho

That's not a bad idea. It needs to be an even number, as it needs to consider the zindex logic of the backdrop.

chrisirhc avatar Apr 06 '15 23:04 chrisirhc

Currently, the new appendToElementId feature (to be changed to appendTo before 1.0) will let the user append to an element of the user's choice, which will allow the user to set the z-index of elements as necessary & put the dropdown from the typeahead in a container that the user can safely manipulate with CSS.

IMO, there is no more work other than the append element feature that we should do then to allow this for the typeahead, as this is a user CSS problem in combination with the new feature.

wesleycho avatar Oct 31 '15 18:10 wesleycho

Angular Material Auto Complete, listbox's Z-index is 1001, so, using of auto complete for inputs or modal or any other popup window required z-index less than 1001

irejwanul avatar Feb 03 '18 15:02 irejwanul