12

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?

rolinger
  • 2,787
  • 1
  • 31
  • 53
  • Maybe you can provide some code, test case to start helping you, because everyone can imagine and create scenario he want ! – Anonymous0day Oct 18 '15 at 11:11
  • You could try to detect when the keyboard is active, and limit the height of the pac-container to the new `window.innerHeight`, while making it scrollable so that overflowing results can be found. See this http://stackoverflow.com/questions/11600040/jquery-js-html5-change-page-content-when-keyboard-is-visible-on-mobile-devices – hampusohlsson Oct 20 '15 at 20:59

1 Answers1

1

The simplest way is to check when the keyboard opens and then minus margin the page a bit.

body.keyboardopen {
     margin-top: -@keyboardheight;
}
Olavi Sau
  • 1,647
  • 13
  • 20