From: Richard Worth Date: Mon, 12 Oct 2009 09:27:23 +0000 (+0000) Subject: slider: fixed two failing unit tests X-Git-Tag: 1.8a2~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=299f20b29966ba5c4cd3570ccb9ca871f39242bb;p=jquery-ui.git slider: fixed two failing unit tests 'value method set respects min' 'value method set respects max' --- diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index ca2dad2eb..84dc9633c 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -405,6 +405,8 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { value: function(newValue) { if (arguments.length) { + newValue = newValue >= this.options.min ? newValue : this.options.min; + newValue = newValue <= this.options.max ? newValue : this.options.max; this._setData("value", newValue); this._change(null, 0); }