From 40f580a0b2259e62e56f2e23bb1e77bd6b1a16f0 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Wed, 19 Sep 2018 07:44:51 -0500 Subject: [PATCH] Change stored number value on change --- manage/config-dialog.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manage/config-dialog.js b/manage/config-dialog.js index 4698c38d..697e1740 100644 --- a/manage/config-dialog.js +++ b/manage/config-dialog.js @@ -316,6 +316,9 @@ function configDialog(style) { if (this.type === 'range') { this.va.value = Number(this.value); $('.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 { this.va.value = this.type !== 'checkbox' ? this.value : this.checked ? '1' : '0'; } @@ -323,6 +326,7 @@ function configDialog(style) { // Applied to input[type=number] function updateVarOnBlur() { + // clamp value visible to user this.value = this.va.value = clampValue(this.value, this.va); }