View Full Version : Selectfield Issue

19 Jun 2011, 9:34 PM
I have issue with sencha touch selecfield issue in iphone when orientation change. After select any option in selectfield if orientation change than it will move to up side of address bar.

Rafael Neri
4 Jul 2011, 5:27 AM
I have the same problem with the datepicker as well. Does anyone have any idea?

Rafael Neri
4 Jul 2011, 5:40 AM
You can see the Kitchen Sink, User Interface, Forms. In iphone click in birthday, after in sliders and change iphone orientation to simulate the bug.

Rafael Neri
5 Jul 2011, 5:39 AM

I fixed the problem as follows:

Ext.Viewport.scrollToTop method was implementation for the following phones apple:

document.body.scrollHeight = document.body.scrollTop; // line 22756

Change this line to

document.body.scrollTop = 0; // line 22756

and the problem was fixed.

14 Dec 2011, 11:27 AM
In version 1.1.0, to save hacking the core code, you can add this code in the same file as your Ext.Setup() function:

Ext.Viewport.scrollToTop = function() {
if (Ext.is.iOS) {
if (Ext.is.Phone) {
//document.body.scrollTop = document.body.scrollHeight; //this is the guilty line!
document.body.scrollTop = 0; //this is the only change to the core function
else if (Ext.is.Blackberry) {
window.scrollTo(0, 1000);
else {
window.scrollTo(0, 1);

Philip Murphy
10 May 2013, 2:22 AM
@Rafael Neri and @goangus - major THANK YOU for this one - working perfectly.:)