From 966d93495aee2cfb95a536014fcf87b37991e823 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Wed, 2 Mar 2022 22:44:47 +0100 Subject: [PATCH] fix: match input field behavior to slider behavior (#684) --- src/components/inputs/MiscellaneousSlider.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/inputs/MiscellaneousSlider.vue b/src/components/inputs/MiscellaneousSlider.vue index 8cf8aa15..c6b44c34 100644 --- a/src/components/inputs/MiscellaneousSlider.vue +++ b/src/components/inputs/MiscellaneousSlider.vue @@ -284,11 +284,10 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) { if (this.errors().length > 0) return const input = this.inputValue / 100 - if (input > this.max) { - this.value = this.max - } else if (input < this.off_below) { + if (this.value === 0 && input < this.off_below) { + this.value = this.off_below + } else if (this.value >= this.off_below && input < this.off_below) { this.value = 0 - this.inputValue = 0 } else this.value = input this.sendCmd()