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 9b5a476 commit 9151db7
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 @@ -600,6 +600,10 @@ export class IntTextView extends DescriptionView {
*/
handleKeypress(e: KeyboardEvent): void {
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 9151db7

Please sign in to comment.