-
24 Jan 2012 6:33 PM #1
Ext.navigation.view - the pop event sends the wrong view to listener
Ext.navigation.view - the pop event sends the wrong view to listener
Ext version tested:
- Sencha Touch 2.0PR4
- Chrome 15 (Linux)
- Ext.navigation.view - the pop event is sending the newly active item instead of the popped view http://docs.sencha.com/touch/2-0/#!/...View-event-pop
- Create Ext.navigation.View, hook up a listener to the pop event, push 2 views, pop the top view. The 2nd argument to the listener is the the first view not the second.
- The 2nd argument to the pop event listener should be the popped view
- The 2nd argument to the pop event listener is the active view
Possible Fix:Code:var view = Ext.create('Ext.navigation.View', { constructor : function(config) { this.callParent(arguements); this.push({ title : 'view a', xtype : 'list'}; this.push({ title : 'view b', xtype : 'button'}; this.addListener('pop', this.onPopped, this); }, onPopped : function(view, poppedView, eOpts) { console.log(poppedView); // will be the list not the button }, });
- In doSetActiveItem change the following
toCode:me.fireEvent('pop', this, activeItem);
Code:me.fireEvent('pop', this, oldActiveItem);Last edited by melevine; 24 Jan 2012 at 6:37 PM. Reason: reported wrong ver of chrome
-
25 Jan 2012 9:17 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,659
- Vote Rating
- 14
Thank you for the report.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1562
in
2.0.


Reply With Quote