diff options
Diffstat (limited to 'src/components/ui/input/index.tsx')
-rw-r--r-- | src/components/ui/input/index.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx index 225517ba8..7e3179baf 100644 --- a/src/components/ui/input/index.tsx +++ b/src/components/ui/input/index.tsx | |||
@@ -16,6 +16,7 @@ import { | |||
16 | injectIntl, | 16 | injectIntl, |
17 | } from 'react-intl'; | 17 | } from 'react-intl'; |
18 | import withStyles, { type WithStylesProps } from 'react-jss'; | 18 | import withStyles, { type WithStylesProps } from 'react-jss'; |
19 | import { isEnterKeyPress } from '../../../jsUtils'; | ||
19 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 20 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
20 | import Error from '../error'; | 21 | import Error from '../error'; |
21 | import Icon from '../icon'; | 22 | import Icon from '../icon'; |
@@ -96,7 +97,7 @@ class Input extends Component<IProps, IState> { | |||
96 | } | 97 | } |
97 | 98 | ||
98 | onInputKeyPress(e: KeyboardEvent<HTMLInputElement>): void { | 99 | onInputKeyPress(e: KeyboardEvent<HTMLInputElement>): void { |
99 | if (e.key === 'Enter') { | 100 | if (isEnterKeyPress(e.key)) { |
100 | const { onEnterKey = noop } = this.props; | 101 | const { onEnterKey = noop } = this.props; |
101 | onEnterKey(); | 102 | onEnterKey(); |
102 | } | 103 | } |