Author: pyaschenko
Date: 2008-01-23 10:01:12 -0500 (Wed, 23 Jan 2008)
New Revision: 5559
Modified:
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
Log:
RF-1983
Modified:
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
---
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2008-01-23
14:10:11 UTC (rev 5558)
+++
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2008-01-23
15:01:12 UTC (rev 5559)
@@ -187,15 +187,15 @@
if (isNaN(sliderValue)){
sliderValue=0;
}
- sliderValue = this.getNearestValue(sliderValue);
+ var newValue = this.getNearestValue(sliderValue);
+ this.value = newValue;
- this.value = sliderValue;
-
- if (!this.editInFocus && (this.required || "" != this.input.value ||
this.updating)){
+ if ((!this.editInFocus || newValue==sliderValue) && (this.required ||
"" != this.input.value || this.updating)){
this.input.value = this.value;
// this.optionInput.value = this.value;
- this.handle.style.left = this.translateToPx(sliderValue);
- } else {
+ this.handle.style.left = this.translateToPx(newValue);
+ } else
+ {
this.handle.style.left = "-2px";
}
if (!this.tip.firstChild) {