aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.slider.js
diff options
context:
space:
mode:
authorDominic Barnes <dominic@dbarnes.info>2012-12-06 16:11:23 -0600
committerScott González <scott.gonzalez@gmail.com>2012-12-18 11:48:10 -0500
commit209443d716587d896ffcdf26c0fd8c8a23437b3c (patch)
treecd763397039fadf9cd8b9a8c90b65724967ec298 /ui/jquery.ui.slider.js
parent9cbd4b42221389277cf90a6662f17c500d1a77df (diff)
downloadjquery-ui-209443d716587d896ffcdf26c0fd8c8a23437b3c.tar.gz
jquery-ui-209443d716587d896ffcdf26c0fd8c8a23437b3c.zip
Slider: Create clone of options.values during _create(). Fixed #8892 - Multiple Sliders have Conflict with options.values.
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r--ui/jquery.ui.slider.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index 4054f1848..712c6853d 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -62,9 +62,10 @@ $.widget( "ui.slider", $.ui.mouse, {
if ( o.range === true ) {
if ( !o.values ) {
o.values = [ this._valueMin(), this._valueMin() ];
- }
- if ( o.values.length && o.values.length !== 2 ) {
+ } else if ( o.values.length && o.values.length !== 2 ) {
o.values = [ o.values[0], o.values[0] ];
+ } else if ( $.isArray( o.values ) ) {
+ o.values = o.values.slice(0);
}
}