PDA

View Full Version : Selectfield does not always disappear properly.



Nicodemuz
5 Jun 2011, 11:05 PM
Sencha Touch version tested:

1.1




Platform tested against:

iPad 1
iPad 2


Description:

I have several selectfields in my panel. Opening and closing selectfields works as supposed to most of the time. However, sometimes I notice a bug after making a selection in the selectfield. The selectfield disappears correctly after making the selection, but it is still possible to make a selection after the list is hidden. Please see the screenshot to get a better understanding. It shows the selectfield list when I inspect the element on Google Chrome. Obviously it shouldn't be there, as it is disrupting the touchevents of my other UI components.

Also:
- I have multiple visible selectfields in the same fieldset/panel.
- All my selectfields are connected to a store.


Test Case:



var store_UnitSelectionOverlay_Units = new Ext.data.JsonStore({
model: 'UnitSelectionOverlay_Selectfields',
proxy: {
type: 'ajax',
url: '/search',
filterParam: '...',
},
autoLoad: false,
remoteFilter: true,
listeners: {
load: function(store, records, success) {

// Remove old select field (if any)
Ext.getCmp('fieldset_UnitSelection').remove('selectfield_Units');

// Add a new select field
Ext.getCmp('fieldset_UnitSelection').add({
id: 'selectfield_Units',
placeHolder: 'Select Unit',
xtype: 'selectfield',
name: 'unit',
label: 'Unit number',
disabled: false,
store: store_UnitSelectionOverlay_Units,
listeners: {
change: function(selectfield, unit) {

// Lots of code and other logic

}
}
});

// Layout the new selectfields
Ext.getCmp('fieldset_UnitSelection').doLayout();

// Mark as loaded
Ext.getCmp('UnitSelectionOverlay').setLoading(false);

}
}
});


Screenshot or Video:

26443

http://www.sencha.com/forum/attachment.php?attachmentid=26443&d=1307343818

Possible fix:

not provided