fix NumControlBox to not firing onFinish with keyboard

This commit is contained in:
Jeff Nusz 2016-11-14 13:14:27 -08:00
parent 8060842569
commit dd5d0fc908

View File

@ -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();
}