Skip to content

Commit 776235c

Browse files
committed
NumberInput: prevent propagation of enter key
1 parent 0b62a8c commit 776235c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/widgets/NumberInput.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import React from 'react';
1111
import classNames from 'classnames';
1212
import PropTypes from 'prop-types';
1313

14+
import MiscUtils from '../../utils/MiscUtils';
1415
import Icon from '../Icon';
1516

1617
import './style/NumberInput.css';
@@ -124,6 +125,7 @@ export default class NumberInput extends React.Component {
124125
onKeyDown = (ev) => {
125126
if (ev.key === 'Enter') {
126127
this.commit();
128+
MiscUtils.killEvent(ev);
127129
}
128130
// Ensure prefix/suffix isn't changed
129131
const selStart = ev.target.selectionStart;

0 commit comments

Comments
 (0)