Skip to content

Commit

Permalink
Bugfix: fix return key submission of IntText widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Sep 18, 2020
1 parent 80921ac commit 7ba1859
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/controls/src/widget_int.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,10 @@ class IntTextView extends DescriptionView {
*/
handleKeypress(e: KeyboardEvent) {
if (/[e,.\s]/.test(String.fromCharCode(e.keyCode))) {
// Handle return key submission
if (e.keyCode === 13) {
this.handleChanged(e);
}
e.preventDefault();
}
}
Expand Down

0 comments on commit 7ba1859

Please sign in to comment.