PDA

View Full Version : First Click bug - Sencha - Phonegap - Android



djay
7 Jul 2011, 12:38 AM
We are using Sencha to build our App. To wrap this application we are using PhoneGap.
Every thing works great except the first button tap" When we load application first tap on any button does not fired instantly, the button remains in pressed state and handler is called only after we scroll.

We have created the Sencha button in following way:


var btnSubmit={

id : 'btnSubmit',

text: 'Sign in',

ui : 'confirm',

xtype:'button',

scroll:false,

handler: LoginHandler,

width:Ext.is.Phone ? 150:150,

layout:{

type:'vbox',

align:'center'

},

style : { 'margin-left' : '20%', padding : '0.36em' }

}


Thanks,
Djay

Hanni Sullivan
7 Jul 2011, 12:53 AM
Please use the code buttons: http://www.sencha.com/forum/images/editor/code.png, http://www.sencha.com/forum/images/editor/html.png, http://www.sencha.com/forum/images/editor/php.png on the upper right of the "Your message" field.



var btnSubmit = {
id : 'btnSubmit',
text: 'Sign in',
xtype:'button',
scroll:false,
handler: LoginHandler,
width: Ext.is.Phone ? 150 : 150,
layout:{
type:'vbox',
align:'center'
},
style : {
'margin-left' : '20%',
padding : '0.36em'
}
};


Much more readable, right?

Is the LoginHandler really fired?

djay
7 Jul 2011, 1:30 AM
Thanks for the code format.
Yes LoginHandler does get fired but after scroll.

Thanks,
Djay

jdb
7 Jul 2011, 8:20 PM
I also experience this (iPhone 3Gs iOS 4.3).

Happens with all Sencha samples as well: first tap on list or nested list has a 2 second delay.

Anyone has a tweak for this?