I'm developing a hybrid application for mobile, using HTML5 and JS. I have the following problem: when I click, for example, in Nickname, it opens the Sex part. However, it is very strange behavior, it only happens when it is the first time the field is opened, if the field is already focused, it proceeds correctly. Another situation that occurred: When I switch focus to another field, it works perfectly.
Below is the image of the problem. A nickname was clicked, and what he opened was his birthday.
ImadeasimulationinjsFiddlebutitworksperfectly.
link
This is the function I do to manage the clicks, I use this for the field that is focused, and it always stays at the top of the page.
var inputs = $('input').get();
$(inputs).on('focus', function () {
var pos = $(this).offset(),
posFinal = pos.top - 55;
$(this).closest('.upage').scrollTop(posFinal);
});