Skip to content

Commit

Permalink
Allow updates to OptionController while listening. fix #101
Browse files Browse the repository at this point in the history
  • Loading branch information
customlogic committed Aug 18, 2016
1 parent f53cfa5 commit ca19030
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dat/controllers/NumberControllerBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class NumberControllerBox extends NumberController {
}

updateDisplay() {
if (dom.isActive(this.__input)) return null; // prevent number from update if user is trying to manually update
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();
}
Expand Down
1 change: 1 addition & 0 deletions src/dat/controllers/OptionController.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class OptionController extends Controller {
}

updateDisplay() {
if (dom.isActive(this.__select)) return this; // prevent number from updating if user is trying to manually update
this.__select.value = this.getValue();
return super.updateDisplay();
}
Expand Down

0 comments on commit ca19030

Please sign in to comment.