PDA

View Full Version : [FIXED] setMenu causes button to disappear after upgrading to ExtJS 6.5



ahamed
15 May 2017, 1:35 PM
After upgrading from 6.2.1 to 6.5, calling setMenu on a button causes the button to disappear.

Fiddle:
https://fiddle.sencha.com/#view/editor&fiddle/1vjr

Steps to reproduce:
1) First click on the Button 1 to see its menu
2) Click anywhere on the screen to hide the menu
3) Click on Button 2
4) Button 1 disappears

evant
15 May 2017, 6:17 PM
Thanks for the report! I have opened a bug in our bug tracker.

Trevor4001
5 Aug 2017, 9:00 AM
The following is a workaround that ensures the layout gets updated.


Ext.define('MyApp.button.Button', {
override: 'Ext.button.Button',

setMenu: function(value) {
this.callParent(arguments);
// The layout occasionally doesn't get updated, so defer a layout update.
this.updateLayout({ defer: true });
}
});