Note: Initially I posted this question for code review, but realized this is really a question about user interface.
I am working on an e-commerce website, I have 2 types of autocomplete inputs:
- Address Finder (suggests locations)
- Category Autocomplete (suggests category for a product)
The problem I'm solving is that on a mobile device, the autocomplete's suggestions opens under the input and the keyboard pops up and, sometimes, hides the suggestions as shown below:
What I want to do is to highlight the autocomplete input when it is focused in mobile devices. That is to bring it to the top of the screen and hide everything else. This is what ebay does on mobile devices.
Screen Shot of the Solution
You can check the actual behavior here.
- Any feedback/suggestion on this approach?
- At the moment I am only using this approach for Autocomplete inputs. Category Suggester and Google Address Finder. Should I use the same approach for normal inputs? As you know, Chrome sometimes opens a suggestions dropdown for normal inputs... I feel having the keyboard and a suggestion box on the screen gets a bit too much.