mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Slider: Create a copy of the options.values array for the return value of _value(). Fixes #4751 - Dragging slider modifies values, even if callback returns false.
Thanks bkrausz.
This commit is contained in:
parent
aacecd6450
commit
1a28670720
@ -482,7 +482,9 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
|
||||
|
||||
return val;
|
||||
} else {
|
||||
return this.options.values;
|
||||
// .slice() creates a copy of the array
|
||||
// this prevents outside manipulation of the internal state
|
||||
return this.options.values.slice();
|
||||
}
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user