Position inputs at the top of the viewport when focused

Hi Guys,

The keyboard plugin has a great feature that causes elements to be scrolled into the viewport when the keyboard is open. I have a scenario where that behaviour doesn’t go far enough. I have a typeahead field and it needs all the vertical space it can get. So the behaviour I want is as follows:

  1. touch input field
  2. page should scroll to position the input at the top of the viewport
  3. touch close keyboard
  4. page should scroll back to its previous position

I had a look at the source for views/scrollView.js and the default ionic behaviour seems to be mandatory. I’d rather not try to fight with the ionic behaviour. Has anyone accomplished anything like this?

Any suggestions would be much appreciated.