PDA

View Full Version : Hiding button doesnt work in firefox



vipinsudhakar
21 Oct 2014, 12:18 AM
I tried hiding extjs buttons using Ext.getCmp(field).hide() as well as Ext.getCmp(field).setVisible(false). It is working as expected in Chrome, but its not working in firefox.
Did i miss anything here.
Thanks

scottmartin
21 Oct 2014, 2:55 PM
What version of FF are you using? What is 'field' reference? a field or a button?

This seems to work as expected:

paste code in fiddle:
https://fiddle.sencha.com/#home



var button = Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {
alert('You clicked the button!');
}
});

setTimeout(function(){
button.setVisible(false);
},1000);