Reputation: 974
I have a window which I maximize after it is shown. Now my customer needs to minimize/maximize it so I added the minimize/maximize tools like so
tools:[{
type: 'minimize',
handler: function(event, target, owner, tool){
owner.up('window').collapse();
}
},{
type: 'maximize',
handler: function(event, target, owner, tool){
owner.up('window').expand();
}
}]
This works fine for one time. After that the minize button does nothing and the window stays maximized. It work again for one time when I close and reopen the window so it seems to be a sortt of reference problem. The console prints no error.
Upvotes: 4
Views: 1724
Reputation: 23973
This seems to be a bug. You expand the Window ExtJS doesn't reset the isCollapsingOrExpanding
property which cause that all other expand/collapse operations are aborted. You can try to reset it yourself
handler: function(event, target, owner, tool){
owner.up('window').expand();
owner.up('window').isCollapsingOrExpanding = 0;
}
This is untested but it should work for you. You should mark this line and check with every ExtJS update if the issue is fixed in the framework.
Upvotes: 2