My dropdown menu keeps hiding behind the bootstrap Modal and despite trying various solutions, I have not been able to resolve the issue. Here is a snippet of the code:
<ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all"
id="ui-id-2" tabindex="0" style="display: none; top: 813px; left: 76px; width: 239px;">
<li>....</li>
</ul>
The CSS for my autocomplete feature is as follows:
.ui-autocomplete {
border:1px solid #b2b8bd;
font-size: .750em;
max-height: 300px;
overflow-y: auto;
z-index:9999;
}
In another SCSS file, I've defined
$zindex-modal-background: 1040 !default;
with the following definition for ui-front:
.ui-front {
z-index: $zindex-modal-background;}
It seems that the style provided by ui-front is overriding the z-index defined for the autocomplete feature. The result in my browser looks like this:
https://i.sstatic.net/R276U.png
I attempted to use !important on the z-index for ui-autocomplete, but it appears that !important cannot be applied to a class (only to an id). Since this dropdown menu is used in multiple places, assigning an id is not feasible. Is there a way to bring the dropdown menu to the front and display above the modal?
Thank you.