javascript - Sencha touch scroll issue when tabbing between text fields -



javascript - Sencha touch scroll issue when tabbing between text fields -

i've got number of text fields on panel in sencha touch (2.3) app.

when utilize tab key navigate downwards through panel, scroll position gets updated accordingly.

however, after tabbing downwards page, when seek scroll panel (either or down), panel behaving if scroll position still @ top , scrolling gets out of whack. causes scrolling lock or create panel content go off screen.

solved attaching listener calls scrollto function when command field gets focus. ensure scroll position set correctly isn't case tabbing in sencha touch.

myapp.utils.global.attachscrolltoonfocus([ 'firsttextfield', 'secondtextfield', 'thirdtextfield' ], scroller, container);

and utility method:

attachscrolltoonfocus: function(inputs, scroller, container){ var i, scroll = function(e){ var pos = -(container.gety() - ext.get(e.target.id).gety()); if(pos > scroller.getmaxposition().y) { scroller.scrolltoend(); } else { scroller.scrollto(0, pos); } }; for(i = 0; < inputs.length; i++) { ext.get(inputs[i]).on({ focus: scroll }); } }

javascript html5 extjs sencha-touch

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -