I am having a hard time figuring out how to do this.
I am using google.map.places.Autocomplete and its all working fine, but due to app/screen sizes the pac-container with the returned search listings is behind the devices virtual keyboard - and thus on about half of the devices I have tested the user can't see the returned address list. Obviously you don't want the pac-container in front of the keyboard because then various keyboard keys will be hidden.
How can I force the pac-container to appear above (and scroll up) the search/input box?
Autocomplete predictions reflect real searches that have been done on Google. To determine what predictions to show, our systems look for common queries that match what someone starts to enter into the search box but also consider: The language of the query. The location a query is coming from.
Go to the Google Cloud Console. Click the Select a project button, then select the same project you set up for the Maps JavaScript API and click Open. From the list of APIs on the Dashboard, look for Places API. If you see the API in the list, you're all set.
The simplest way is to check when the keyboard opens and then minus margin the page a bit.
body.keyboardopen {
margin-top: -@keyboardheight;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With