Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Place Autocomplete append to div

I have a google autocomplete on a modal and is working (Like this example) but I have an issue. The modal jquery plugin that I'm using set overflow hidden to "html" when opened and if modal height is greater then document height the scroll that appears is from overlay (or backdrop whatever you call it). When autocomplete appears I think they are appended to html, so when I scroll modal the autocomplete stay fixed, looks like they are being appended to html. The same happens with Jquery UI Autocomplete, but they have an option called "appendTo", and I just point it to a div inside modal and works perfectly. I would to know if Google Place Autocomplete have an option like that.

enter image description here

When I scroll

enter image description here

like image 901
Daniel Faria Avatar asked Dec 05 '25 16:12

Daniel Faria


1 Answers

I just faced this issue. I working around the problem. I will hide the scrollbars when the focus is in the input field and show the scroll bars when the focus is lost from the input field. So the user cannot scroll around when they are choosing

like image 158
Andre Frexio Avatar answered Dec 08 '25 20:12

Andre Frexio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!