PDA

View Full Version : [OPEN] Event 'show' fires twice on item of Navigation.View



kurtov
10 Jun 2015, 5:49 AM
I have this code:


Ext.application({
name: 'Sencha',




launch: function() {
var secondView = Ext.create('Ext.Container', {
title: 'Second View',
padding: 10,


listeners: {
show: function() {
console.log('show');
}
},


items: [
{
html: 'second view'
}
]
});


var view = Ext.Viewport.add({
xtype: 'navigationview',


autoDestroy: false,
items: [
{
title: 'Navigation View',
padding: 10,


items: [
{
xtype: 'button',
text: 'Push another view!',
handler: function() {
view.push(secondView);
}
}
]
}
]
});
}
});


when I click button 'Push another view!' the event 'show' fires once. Then I click 'back' and again 'Push another view!'. Now, the event 'show' fires twice. Eventually, I've got in console word 'show' 3 times.

slemmon
15 Jul 2015, 9:03 AM
Thanks for the report! I have opened a bug in our bug tracker.