Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Slider: Fix handle order when setting values of range slider to max
When both values are set to the maximum change them in descending order Fixes #9046 Closes gh-1502
- Loading branch information
1 parent
868e8c7
commit dff1c74dd4c0fd6b951c7c183bebae09f9f229f6
Showing
3 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head lang="en"> | ||
<meta charset="UTF-8"> | ||
<title>jQuery UI Slider - Range slider</title> | ||
<link rel="stylesheet" href="../../../themes/base/all.css"> | ||
<style> | ||
#wrapper { | ||
font-family: Arial; | ||
width: 500px; | ||
margin: 20px auto; | ||
} | ||
</style> | ||
<script src="../../../external/jquery/jquery.js"></script> | ||
<script src="../../../ui/core.js"></script> | ||
<script src="../../../ui/widget.js"></script> | ||
<script src="../../../ui/mouse.js"></script> | ||
<script src="../../../ui/slider.js"></script> | ||
</head> | ||
<body> | ||
<div id="wrapper"> | ||
<h1>Range Slider</h1> | ||
<h3>When set both values of range slider to the maximum, slider should not lock</h3> | ||
<div id="slider"></div> | ||
<br> | ||
<button id="set-max-values">set values to max</button> | ||
<button id="set-min-values">set values to min</button> | ||
</div> | ||
|
||
<script> | ||
var el = $( "#slider" ).slider({ | ||
range: true, | ||
min: 0, | ||
max: 100, | ||
values: [ 0, 50 ] | ||
}); | ||
|
||
$( "#set-max-values" ).on( "click", function() { | ||
el.slider( "option", { values: [ 100, 100 ] } ); | ||
}); | ||
|
||
$( "#set-min-values" ).on( "click", function() { | ||
el.slider( "option", { values: [ 0, 0 ] } ); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters