From dd5d0fc908123b4b2f542c62e0485ec1330fc622 Mon Sep 17 00:00:00 2001 From: Jeff Nusz Date: Mon, 14 Nov 2016 13:14:27 -0800 Subject: [PATCH] fix NumControlBox to not firing onFinish with keyboard --- src/dat/controllers/NumberControllerBox.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dat/controllers/NumberControllerBox.js b/src/dat/controllers/NumberControllerBox.js index edc2761..45fa6e0 100644 --- a/src/dat/controllers/NumberControllerBox.js +++ b/src/dat/controllers/NumberControllerBox.js @@ -64,13 +64,10 @@ class NumberControllerBox extends NumberController { } function onBlur() { - onChange(); + onFinish(); } function onMouseDrag(e) { - // TODO.. why do we need to blur to update input value? - document.activeElement.blur(); - const diff = prevY - e.clientY; _this.setValue(_this.getValue() + diff * _this.__impliedStep); @@ -113,7 +110,6 @@ class NumberControllerBox extends NumberController { } updateDisplay() { - if (dom.isActive(this.__input)) return this; // prevent number from updating if user is trying to manually update this.__input.value = this.__truncationSuspended ? this.getValue() : roundToDecimal(this.getValue(), this.__precision); return super.updateDisplay(); }