From: Ablay Keldibek Date: Mon, 6 Apr 2015 20:58:55 +0000 (-0400) Subject: Slider: Proper animation of range X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a3bf7786d6305826afa4d4de1e2fa2202a4bb91c;p=jquery-ui.git Slider: Proper animation of range Fixes #9459 Closes gh-1530 (cherry picked from commit bf03479cc14aa54c2e674cad87bf75c8126cb86f) --- diff --git a/ui/slider.js b/ui/slider.js index e15b4984e..24ab6e167 100644 --- a/ui/slider.js +++ b/ui/slider.js @@ -625,13 +625,13 @@ return $.widget( "ui.slider", $.ui.mouse, { this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); } if ( oRange === "max" && this.orientation === "horizontal" ) { - this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, o.animate ); } if ( oRange === "min" && this.orientation === "vertical" ) { this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); } if ( oRange === "max" && this.orientation === "vertical" ) { - this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, o.animate ); } } },