PDA

View Full Version : [FIXED][PR3] Disabled css is not set on button (when disabled)



flanders
6 Mar 2011, 12:51 PM
When using an button in a toolbar and setting it "disabled: true", the button does not 'light up' when hovered over and is not pressable (as I expect), however it's disabled (grey) state is not displayed (as I didn't expect)

In Firefox 3.6.14 & Chromium 9.0.597.107 (75357)
On Ubuntu 10.10



Ext.define('wjv.MainToolbar', {
extend: 'Ext.Toolbar',

initComponent: function() {
Ext.apply(this, {
id: 'main-toolbar',
items: [{
cls: 'x-btn-text-icon',
handler: function() {
Ext.getCmp('panel-container').setContained(new wjv.LocationsGrid({}));
},
icon: 'images/icons/building.png',
text: 'Locaties',
xtype: 'button'
}, '|', {
cls: 'x-btn-text-icon',
icon: 'images/icons/user.png',
text: 'Bewoners',
xtype: 'button'
}, '|', {
cls: 'x-btn-text-icon',
icon: 'images/icons/user_red.png',
text: 'Gebruikers',
xtype: 'button'
}, '->', {
cls: 'x-btn-text-icon',
icon: 'images/icons/help.png',
text: 'Help',
xtype: 'button'
}, '|', {
cls: 'x-btn-text-icon',
disabled: true,
icon: 'images/icons/logout.png',
text: 'Uitloggen',
xtype: 'button'
}]
});

wjv.MainToolbar.superclass.initComponent.apply(this, arguments);
}
});

var menuBar = new wjv.MainToolbar({
renderTo: 'main-toolbar'
});

rdougan
6 Mar 2011, 8:15 PM
Will take a look, thanks.

flanders
7 Mar 2011, 1:34 PM
I just found out:
- The issue didnt exist yet in PR2
- The issue doesnt exist in IE8 (8.0.7600.16385)

rdougan
7 Mar 2011, 1:40 PM
I've fixed this today.

naveen_ramawat
11 Jul 2013, 1:14 AM
I am also facing the same issue with Ext 4.2.0, If I use disabled property, The button gets disabled but the css not working so instead of disabled property i used setDisabled method and it is working fine.