My favorites | Sign in
Project Home Downloads Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 78: Scroller position problem after focus change over input tags inside.
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by gianfras...@gmail.com, Sep 21, 2012
I have a scroller wrapper and a scroller inside. In the scroller there is a form with some input elements. Scroller's height is 500px, wrapper's height is 200px. Vertical scrolling is good.

If I move the focus over input elements, this operation seems moving scroller up correctly. But, at the end of the form, I can't touch-scroll the scroller up.

It seems like the focus move does't update the position variables inside iScroll object: so, when the focus reaches the last input element, i can touch-scroll the scroller down (on an empty area) but can't reach the input elements the high part of form.

Please help. Thank you!


Sep 21, 2012
#1 gianfras...@gmail.com
I temporary solved using a workaround: on every focus change, I make move the scroller in the way the focused element never exits the visible area.

You can take a look at my code, commands i call on the onReady event of the page:

<code>
$('#scroller-wrapper input, #scroller-wrapper select').focusin(function() {
    scroller_object.scrollToElement('#' + $(this).attr('id'), 0);
});
            
setTimeout(function () {
    scroller_object.refresh();
}, 100);
</code>

Powered by Google Project Hosting