Question

I want to move or replace .pac-container, the problem is that pac-container is somwhere in deep in my HTML and i want to move whole div to my bootstrap modal, how can i do it?

<div class="pac-container" style="display: none;"></div>

My HTML

<body>
<div class="modal">
<input name="adress"></input>
<!-- I want to move container right here -->
</div>
<div class="container">
Blaaa
</div>
<!-- Concurent position of pac container -->
    <div class="pac-container" style="display: none;"></div>

Was it helpful?

Solution

May I guess that the main issue is that the autocomplete-input is placed in the modal and the suggestions(placed in the .pac-container) will appear behind the modal?

When yes: moving the .pac-container wouldn't help here, the result would be a incorrect position.

Try using a z-index for the .pac-container that is higher than the modal's z-index(currently it's 1050)

<style>
.pac-container{z-index:1051;}
</style>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top