Skip to content

Commit 738f057

Browse files
committed
Ignore only space from whitespace chars in Int text views.
This is another approach to fixing #2959
1 parent 9151db7 commit 738f057

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/controls/src/widget_int.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,7 @@ export class IntTextView extends DescriptionView {
599599
* Handles key press
600600
*/
601601
handleKeypress(e: KeyboardEvent): void {
602-
if (/[e,.\s]/.test(String.fromCharCode(e.keyCode))) {
603-
// Handle return key submission
604-
if (e.keyCode === 13) {
605-
this.handleChanged(e);
606-
}
602+
if (/[e,. ]/.test(String.fromCharCode(e.keyCode))) {
607603
e.preventDefault();
608604
}
609605
}

0 commit comments

Comments
 (0)