Skip to content

Commit

Permalink
revert KeyboardEvent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
pasyukevich committed Nov 30, 2023
1 parent 9f7dd2a commit 7e4b19b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/FormSubmit/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {KeyboardEvent as ReactKeyboardEvent, useEffect} from 'react';
import React, {KeyboardEvent, useEffect} from 'react';
import {View} from 'react-native';
import * as ComponentUtils from '@libs/ComponentUtils';
import isEnterWhileComposition from '@libs/KeyboardShortcut/isEnterWhileComposition';
Expand All @@ -9,7 +9,7 @@ function FormSubmit({children, onSubmit, style}: FormSubmitProps, ref: FormSubmi
/**
* Calls the submit callback when ENTER is pressed on a form element.
*/
const submitForm = (event: ReactKeyboardEvent) => {
const submitForm = (event: KeyboardEvent) => {
// ENTER is pressed with modifier key or during text composition, do not submit the form
if (event.shiftKey || event.key !== CONST.KEYBOARD_SHORTCUTS.ENTER.shortcutKey || isEnterWhileComposition(event)) {
return;
Expand Down

0 comments on commit 7e4b19b

Please sign in to comment.