PDA

View Full Version : [1.1.0] - Select field without a name will not work properly in iPhone



jay@moduscreate.com
17 Apr 2011, 6:01 AM
This bug has plagued the framework since around .97 and I'm surprised it has not been caught. At first I thought it was me, but working on Sencha Touch in Action, I finally narrowed down the behavior pattern.


Looking at the code below, configuring a select field WITH a name, everything works as expected. However, without a name, it seems that tap even does not function, thus the select does not show.



var buildSelectField = function(label) {

return new Ext.form.Select({
label : label,
// name : label,
options : [
{
text : 'TOP',
value : 't'
},
{
text : 'BOTTOM',
value : 'b'
}
],
listeners: {
change : function(field, value) {
var values = selectFormPanel.getValues();
console.log(values);

}
}
});
};



new Ext.Panel({
fullscreen : true,
bodyStyle : 'padding: 10px;',
items : [
buildSelectField('_1'),
buildSelectField('_2'),
buildSelectField('_3'),
buildSelectField('_4')
]
});





NOTE :: The picker field works PERFECTLY without a name property inside of Webkit for the desktop AND the iPad, however for the iPhone:
http://tdg-i.com/img/screencasts/2011-04-17_1000.png

jay@moduscreate.com
17 Apr 2011, 6:06 AM
Also, the docs do not mention anything about this behavior. In fact, the example does not include a name attribute, and by definition fails on the iphone (or anywhere a sheet is used)

http://tdg-i.com/img/screencasts/2011-04-17_1005.png
http://tdg-i.com/img/screencasts/2011-04-17_1004.png

J.C. Bize
21 Apr 2011, 8:55 PM
Thanks Jay. Your post saved me a lot of pain :)

Regards,
JC

siamak_roshan
14 Jul 2011, 11:20 PM
Thanks Jay. I was also having problem with this issue until I saw your post. You sure saved me a lot of headaches :)

Best Regards

siamak

angraxs2
14 Oct 2011, 5:56 AM
Awesome post.

Thank you!

jboesch
11 Nov 2011, 4:44 PM
Thanks for the tip. Was searching everywhere for a solution!