I ran into a similar problem for developing iPhone-based telephony applications. I fixed the problem as follows.
$("input[type=text], textarea"). bind("blur", function(e) { window.scrollTo(0.0); loaded(); });
You can detect a close event with the blur action.
source share