Ticket #5132 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

Slider: Incorrect values returned

Reported by: jerep6 Owned by:
Priority: blocker Milestone: 1.8
Component: ui.slider Version: 1.7.2
Keywords: boundaries values Cc:
Blocking: Blocked by:

Description

Hello, With Jquery 1.8rc1 the slider don't behave well. The boundaries values aren't at the edge of the slider. The minimal value locate one step over and the minimal value is one step before.

For example : Step 0 = val1; Step 1 = val0

See an example of the bug :  http://jerep6.free.fr/bugJquery/bug.html

Attachments

slider_ranges.gif Download (5.1 KB) - added by rmckillen 3 years ago.
slider_ranges.2.gif Download (5.1 KB) - added by rmckillen 3 years ago.

Change History

comment:1 Changed 3 years ago by Rwhitbeck

  • Component changed from ui.slider to [meta] ui.demos

comment:2 Changed 3 years ago by Rwhitbeck

  • Component changed from [meta] ui.demos to ui.core

comment:3 Changed 3 years ago by scott.gonzalez

  • Priority changed from critical to blocker
  • Summary changed from Boundaries values aren't locate at the edge of the slider to Slider: Incorrect values returned

comment:4 Changed 3 years ago by scott.gonzalez

  • Component changed from ui.core to ui.slider

comment:5 Changed 3 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to worksforme

This is working as intended. Replying on forum.

comment:6 Changed 3 years ago by scott.gonzalez

Okay, replying here since this apparently didn't start on the forums...

During a slide the values haven't been updated yet, because the slide event can be cancelled preventing the values from actually changing. If you want to know the values that will occur if the slide event is successful, you have to check the data that is passed to the event:

$( "#slider" ).slider({
    max: 10,
    values: [ 0, 10 ],
    range: true,
    slide: function( event, ui ) {
        console.log( ui.values );
    }
});

Changed 3 years ago by rmckillen

Changed 3 years ago by rmckillen

Note: See TracTickets for help on using tickets.