Results 1 to 3 of 3

Thread: Ext.ux.Spinner Spins while disabled

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    4

    Default Ext.ux.Spinner Spins while disabled

    I noticed that while the SpinnerField is disabled the spinner arrows still altered the field value.

    Here are the three changes I implemented in Ext.ux.Spinner to prevent this bug.

    doEnable
    Code:
    doEnable: function(){
    
    if (this.wrap) { this.wrap.removeClass(this.field.disabledClass); } this.disabled = false; },
    doDisable
    Code:
    doDisable: function(){
    
    if (this.wrap) { this.wrap.addClass(this.field.disabledClass); this.el.removeClass(this.field.disabledClass); } this.disabled = true; },

    isSpinnable
    Code:
    isSpinnable: function(){
    
    if (this.disabled || this.el.dom.readOnly || this.field.disabled) { Ext.EventObject.preventDefault(); //prevent scrolling when disabled/readonly return false; } return true; },
    I know that the last change in the isSpinnable function is a bit of overkill when the first two changes are implemented...However, I thought it would be better to be safe than sorry.

  2. #2

    Default

    Many thanks for this.

  3. #3
    Sencha User
    Join Date
    Dec 2009
    Location
    Lille
    Posts
    18

    Default

    Hi,
    I have the same problem with spinner. Events are fired when spinner is disabled.
    Is it possible to update the code with dblak90 fix ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •