Change stored number value on change
This commit is contained in:
parent
5af74a9d80
commit
40f580a0b2
|
@ -316,6 +316,9 @@ function configDialog(style) {
|
||||||
if (this.type === 'range') {
|
if (this.type === 'range') {
|
||||||
this.va.value = Number(this.value);
|
this.va.value = Number(this.value);
|
||||||
$('.current-value', this.closest('.config-range')).textContent = this.va.value + (this.va.units || '');
|
$('.current-value', this.closest('.config-range')).textContent = this.va.value + (this.va.units || '');
|
||||||
|
} else if (this.type === 'number') {
|
||||||
|
// clamp stored value
|
||||||
|
this.va.value = clampValue(this.value, this.va);
|
||||||
} else {
|
} else {
|
||||||
this.va.value = this.type !== 'checkbox' ? this.value : this.checked ? '1' : '0';
|
this.va.value = this.type !== 'checkbox' ? this.value : this.checked ? '1' : '0';
|
||||||
}
|
}
|
||||||
|
@ -323,6 +326,7 @@ function configDialog(style) {
|
||||||
|
|
||||||
// Applied to input[type=number]
|
// Applied to input[type=number]
|
||||||
function updateVarOnBlur() {
|
function updateVarOnBlur() {
|
||||||
|
// clamp value visible to user
|
||||||
this.value = this.va.value = clampValue(this.value, this.va);
|
this.value = this.va.value = clampValue(this.value, this.va);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user