Google Maps Autocomplete Result in Bootstrap Modal Dialog

前端 未结 9 921
孤城傲影
孤城傲影 2020-12-07 17:22

I have a Google Maps Autocomplete input field inside a Twitter Bootstrap modal dialog and the autocomplete result is not displayed. However, if I press the down arrow key, i

9条回答
  •  太阳男子
    2020-12-07 17:54

    In my scenario the .pac-container 's z-index value will be init and override to 1000, even I set in CSS. (possibly by google API?)

    my dirty fix

    $('#myModal').on('shown', function() {
         $(".pac-container").css("z-index", $("#myModal").css("z-index"));
    }
    

提交回复
热议问题