1

In my Phonegap application, I have one screen where if the user taps or clicks outside of the textarea, the keyboard should hide. I used the .blur( function, but by doing that the screen goes up and the user can't see the application bar on the top (the screen itself doesn't move though).

shadowmanwkp
  • 124
  • 9
Anup
  • 3,283
  • 1
  • 28
  • 37

1 Answers1

2

After calling blur, try window.scrollTo(0,0).

If I recall correctly, you might have to wrap it in a 0ms setTimeout

$('#someInput').blur();
setTimeout(function(){
  window.scrollTo(0, 0);
}, 0);
Kevin Ennis
  • 14,226
  • 2
  • 43
  • 44