z-index of typeahead conflicts with modal
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.
This is not limited to typeahead. popover and tooltip are concerned as well.
+1
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?
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;
+1 with clockpicker and modals.
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.
We can change it to index * 5 or something smaller - that would mitigate this issue.
That's not a bad idea. It needs to be an even number, as it needs to consider the zindex logic of the backdrop.
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.
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