Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5132 closed bug (worksforme)

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:
Blocked by: Blocking:

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 (2)

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

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by Rwhitbeck

Component: ui.slider[meta] ui.demos

comment:2 Changed 10 years ago by Rwhitbeck

Component: [meta] ui.demosui.core

comment:3 Changed 10 years ago by Scott González

Priority: criticalblocker
Summary: Boundaries values aren't locate at the edge of the sliderSlider: Incorrect values returned

comment:4 Changed 10 years ago by Scott González

Component: ui.coreui.slider

comment:5 Changed 10 years ago by Scott González

Resolution: worksforme
Status: newclosed

This is working as intended. Replying on forum.

comment:6 Changed 10 years ago by Scott González

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 10 years ago by rmckillen

Attachment: slider_ranges.gif added

Changed 10 years ago by rmckillen

Attachment: slider_ranges.2.gif added
Note: See TracTickets for help on using tickets.