PDA

View Full Version : [DUP] Customs cls are having prefix added to them (Button)



fedevegili
12 Aug 2013, 4:34 AM
REQUIRED INFORMATION

Ext version tested:

Ext 4.2.1.883
Browser versions tested against:

Chrome 28.0.1500.95 m
Description:

While updating from Ext 4.1.1 to Ext 4.2.1.883 I noticed that buttons with customs cls are having the baseCssPrefix added to them, while this hadn't happen before and must be a bug.
Steps to reproduce the problem:

Create a button with the overCls attribute.
Hover the button.
The result that was expected:

The button should have the overCls added to it's classList
The result that occurs instead:

The button has a overCls with baseCssPrefix added to it's classList
Test Case:


Ext.create('Ext.Button', { text : 'Button',
overCls : 'test-over',
pressedCls : 'test-pressed',
focusCls : 'test-focus',
renderTo : Ext.getBody()
});

HELPFUL INFORMATION

Possible fix:

After some debugging I found out that the method Ext.AbstractComponent.addOverCls on 4.1.1 just added the overCls:


addOverCls: function() {
var me = this;
if (!me.disabled) {
me.el.addCls(me.overCls);
}
}


While on 4.2.x it goes thru Ext.AbstractComponent.addClswithUI method:


addOverCls: function() {
if (!this.disabled) {
this.addClsWithUI(this.overCls);
}
},
Operating System:

Win7 64bits

Gary Schlosberg
12 Aug 2013, 12:52 PM
Thanks for the report! I have opened a bug in our bug tracker.