Autocomplete issue into bootstrap modal

前端 未结 11 2574
旧时难觅i
旧时难觅i 2020-12-01 05:57

I have a display problem in the jQuery autocomplete inside a modal dialog bootstrap.

When I mouse scroll, the results do not remain attached to the input.

Is

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 06:28

    The actual issue is that the Bootstrap Modal has a higher Z-index than any other element in the page. Thus, auto complete actually works - but it gets hidden behind the dialog.

    You just need to add this in any of your added css files:

    .ui-autocomplete {
      z-index:2147483647;
    }
    

提交回复
热议问题