Results 1 to 3 of 3

Thread: Toggle field change event bug

    You found a bug! We've classified it as TOUCH-5192 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Aug 2012
    Posts
    70

    Default Toggle field change event bug

    Hi,

    When I try to drag the toggle from one side to another side, it will trigger change event twice. Please check this case. Thank you!

    Best Regards,

    Andy

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

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

  3. #3
    Sencha Premium User
    Join Date
    Aug 2012
    Posts
    70

    Default

    I found that in Ext.slider.Slider, onThumbDrag trigger change event once, and then in onThumbDragEnd it will trigger change event again.

    So I try to override onThumbDragEnd() in Ext.slider.Toggle as:
    Code:
    ...
    override: 'Ext.slider.Toggle',
    onThumbDragEnd: function(thumb, e) {
            this.refreshThumbConstraints(thumb);
            var index = this.getThumbIndex(thumb),
                newValue = this.getValue()[index],
                oldValue = this.dragStartValue;
    
    
            this.fireEvent('dragend', this, thumb, this.getValue(), e);
        }
    and it seems work.

    I don't know whether I'm right, please point out if any mistake, but I really need a temporary fixed, thank you.

    Andy

Posting Permissions

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