diff --git a/src/dat/controllers/NumberControllerBox.js b/src/dat/controllers/NumberControllerBox.js index 462ebf2..940c20e 100644 --- a/src/dat/controllers/NumberControllerBox.js +++ b/src/dat/controllers/NumberControllerBox.js @@ -108,6 +108,10 @@ class NumberControllerBox extends NumberController { } updateDisplay() { + if(this.__input === document.activeElement) { + return; + } + this.__input.value = this.__truncationSuspended ? this.getValue() : roundToDecimal(this.getValue(), this.__precision); return super.updateDisplay(); } diff --git a/src/dat/controllers/NumberControllerSlider.js b/src/dat/controllers/NumberControllerSlider.js index f75bc0e..67b3cf1 100644 --- a/src/dat/controllers/NumberControllerSlider.js +++ b/src/dat/controllers/NumberControllerSlider.js @@ -109,6 +109,9 @@ class NumberControllerSlider extends NumberController { } updateDisplay() { + if(this.__input === document.activeElement) { + return; + } const pct = (this.getValue() - this.__min) / (this.__max - this.__min); this.__foreground.style.width = pct * 100 + '%'; return super.updateDisplay();