From 299f20b29966ba5c4cd3570ccb9ca871f39242bb Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 12 Oct 2009 09:27:23 +0000 Subject: [PATCH] slider: fixed two failing unit tests 'value method set respects min' 'value method set respects max' --- ui/jquery.ui.slider.js | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.39.5