Reputation: 3353
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).
Upvotes: 1
Views: 4817
Reputation: 14456
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);
Upvotes: 2