FREAC / COM

Find the latest version of the web app here:

Home Page:https://hermes.freac.fsu.edu/com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search for address -- auto-fill is hidden on mobile phone

shodge17 opened this issue · comments

This can only be seen on an actual phone. When the keyboard pops up it makes the screen much smaller so only the top part of the suggested addresses can be seen.

Perhaps the simplest solution would be to move the address search above the "locate me" button. That might just be enough to show at least one or two suggestions.

@shodge17 Do you mean this address search?

image

Or do you mean the provider search?

image

If it is the provider search, would you like me to put a location search here:

image

The very top image - after clicking the magnifying glass

@shodge17 Okay, thanks for the clarification. I can rearrange these controls today.

Live demo on GitHack

I was able do to this, and ran into a little bit of a problem:
image

As an alternate approach, leaflet has a method to detect if on mobile browser. This would give us more room to view the address autocomplete.

Code snippit to detect mobile browser:

// if mobile browser true
 if (L.Browser.mobile) {
    // Do something
 }

With the controls put back into the original orders, but zoom control removed on mobile:
image

Also, since we can detect if on browser, maybe we can also detect when the keyboard is raised. I have researched this a little bit, but I haven't yet found this event trigger.

Maybe it would be a useful case that when the keyboard is raised:

  • The provider search bar is moved to floating on the top of the map
  • Legend panel reverts to display: none

Then, once the map keyboard is lowered:

  • Legend display re-enabled
  • Provider search is moved back into legend.

Further from that, I think having the search bar always at the top of the map would put it out of the way of the raised keyboard, and give more room for results to display. I know we had gone away from this solution before, but I figured it was at least partially because of all of the funky rules and formatting that needed to be ironed out with bootstrap classes. I was wondering your (@shodge17) thoughts on this as possible future functionality.

This should now be fixed and merged back into the master.