Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-8250 in a recent build.
  1. #1
    Sencha User skrooks's Avatar
    Join Date
    Dec 2012
    Posts
    6
    Vote Rating
    0
    skrooks is on a distinguished road

      0  

    Default [4.1.1a] Ext.slider.Multi setMinValue and setMaxValue don't fire change event

    [4.1.1a] Ext.slider.Multi setMinValue and setMaxValue don't fire change event


    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.1.1a
    Browser versions tested against:
    • Firefox 18.0 (Windows)
    DOCTYPE tested against:
    • ____
    Description:
    • Suppose you have a slider with a defined minValue, maxValue and one or more values. If a call to setMinValue or setMaxValue causes one of slider's values to snap into the new valid range, the change event does not get fired.
    Steps to reproduce the problem:
    • Create a multislider with defined minValue and maxValue.
    • Set 2 values, one at the min and one at the max.
    • Add an event handler for the change event.
    • Increase the minValue and decrease the maxValue so that the values are adjusted to fit within the valid range.
    The result that was expected:
    • The change event handler should be called
    The result that occurs instead:
    • The change event handler does not get called
    Test Case:

    Code:
    Ext.create('Ext.window.Window', {
      layout : 'vbox',
      autoShow : true,
      items : [
        {
          xtype : 'multislider',
          minValue : 0,
          maxValue : 100,
          width : 100,
          values : [0, 100],
          listeners : {
            change : function () {
              alert("Slider value changed!")
            }
          }
        },
        {
          xtype : 'button',
          text : 'Shrink',
          listeners : {
            click : function (button) {
              var slider = button.up('window').down('multislider');
              slider.setMinValue(slider.minValue + 1);
              slider.setMaxValue(slider.maxValue - 1);
            }
          }
        }
      ]
    });
    Clicking the "Shrink" button should pop up a message saying "Slider value changed!".


    HELPFUL INFORMATION


    Debugging already done:
    • In Multi.js (Ext.slider.Multi), the setMinValue and setMaxValue functions update the thumb values directly but don't bother firing any events. Looking at the code for setValue, I'm wondering if setMinValue and setMaxValue should also make a call to checkDirty.
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Win7 Pro

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1