Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Jul 2008
    Location
    New Zealand
    Posts
    91
    Vote Rating
    3
    Greendrake is on a distinguished road

      0  

    Default [FIXED]Ext.core.Element.removeCls issue

    [FIXED]Ext.core.Element.removeCls issue


    I noted that Ext.core.Element.removeCls is sometimes called with argument containing several space-separated classes to remove. For example, in AbstractComponent.js, line 1669. In my case it was a button bound to a form and trying to enable itself when the form had become valid (it should be noted that the case occurs only if the button was disabled at the beginning). The this.disabledCls variable was containing the following value:

    x-item-disabled x-btn-default-small-disabled

    As Ext.core.Element.removeCls accepts single CSS class or array of single CSS classes only, the classes were not removed and the button remained looking disabled though it actually had become enabled (responding to clicks).

    At this moment I have solved the issue overriding the relevant piece of code with

    this.el.removeCls(this.disabledCls.split(' '));

    Would the Team consider Ext.core.Element.removeCls to accept multiple space-separated classes, for example by modifying the piece of the removeCls code where className is checked against being an array like this:
    PHP Code:
            if (!Ext.isArray(className)){
                if (
    spacesRe.test(className)) {
                    return 
    this.removeCls(className.split(spacesRe));
                }
                
    className = [className];
            } 

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,006
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This has been implemented.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Similar Threads

  1. Replies: 5
    Last Post: 14 Jun 2009, 1:57 AM
  2. [FIXED][3.0 Core svn310] Element
    By stever in forum Ext 3.x: Bugs
    Replies: 4
    Last Post: 21 May 2009, 5:09 PM
  3. [FIXED][Core 3.0 Beta] Element InsertAfter IE6
    By Rowan in forum Ext 3.x: Bugs
    Replies: 3
    Last Post: 20 May 2009, 12:32 AM
  4. Replies: 1
    Last Post: 21 Apr 2009, 8:00 AM
  5. Replies: 1
    Last Post: 21 Apr 2009, 8:00 AM

Thread Participants: 1