Hybrid View
-
2 Nov 2010 11:17 AM #1
[FIXED-502] List created by Select field is never destroyed if hidden on mask tap
[FIXED-502] List created by Select field is never destroyed if hidden on mask tap
Select field has createList function that creates List of options, which is configured with hideOnMaskTap: true. If a user taps one of the items in this List, it gets hidden and destroyed properly. However if a user taps on a mask, the list gets hidden but is never destroyed and therefore stays in DOM forever.
Proposed solution in Select.js (the changes are highlighted in red):
Something like this. It should to the trick although I haven't personally tested itCode:createList: function() { return new Ext.List({ store: this.store, tpl : [ '<tpl for=".">', '<div class="x-list-item">', '<span class="x-list-label">{' + this.displayField + '}</span>', '<span class="x-list-selected"></span>', '</div>', '</tpl>' ], cls : 'x-select-overlay', itemSelector : '.x-list-item', floating : true, stopMaskTapEvent: true, hideOnMaskTap : true, singleSelect : true, listeners: { selectionchange: { fn: this.onListSelect, scope: this }, hide: function() { this.destroy(); } } }); }, onListSelect : function(list, node, records) { var me = this, selected = records[0]; if (selected) { me.setValue(selected.get(me.valueField)); me.fireEvent('select', me, me.getValue()); } me.list.hide({ type: 'fade', out: true // This is not needed because the list gets destroyed by its own hide event // after: function() { // me.list.destroy(); // }, // scope: me }); },
Eugene
Ext.Direct for ASP.NET MVC
-
2 Nov 2010 2:26 PM #2
-
12 Nov 2010 7:13 PM #3
The Select class has since been refactored and this issue has now be resolved. Marking as fixed.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
25 Aug 2012 2:46 AM #4
How to take control over multiple x-select-overlay classes ?????????
How to take control over multiple x-select-overlay classes ?????????
Hi,
This is Vijay. I have a doubt. In my application there are more than one select fields. I need to configure each select field with different styles say colors, width, height. The id generated for x-select-overlay is not unique or is there anyway we can give an id to the x-select-overlays individually ?. Can anyone suggest a way to style the x-select-overlay classes individually. Is the createList function in this thread defined by Sencha or user defined ?? can we override this funciton in our code to take a control of x-select-overlay classes ???? Kindly reply with a solution asap. !!! Thanks in advance.............
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Tap event on List
By denishoctor in forum Sencha Touch 1.x: DiscussionReplies: 5Last Post: 31 Aug 2010, 6:17 AM -
[FIXED-1178] Spinner field with focus has undefined dom when destroyed
By zombeerose in forum Ext 3.x: BugsReplies: 0Last Post: 4 Aug 2010, 7:36 AM -
[FIXED] List on hidden panel is visible
By GaryW in forum Sencha Touch 1.x: BugsReplies: 7Last Post: 19 Jul 2010, 10:10 AM -
Update a hidden field on a ComboBox select?
By travisbell in forum Ext 3.x: Help & DiscussionReplies: 5Last Post: 22 Oct 2009, 3:38 PM -
Ext.form.Field (Select) Created From Existing Markup?
By thejoker101 in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 24 Jul 2007, 7:59 AM


Reply With Quote