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).
Asked
Active
Viewed 4,805 times
1

shadowmanwkp
- 124
- 9

Anup
- 3,283
- 1
- 28
- 37
1 Answers
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