fix: Fixed issue where using arrow keys while renaming file would navigate to another file

This commit is contained in:
Aman Harwara
2023-01-19 20:20:47 +05:30
parent b9081a1fd0
commit 2d63b7431a

View File

@@ -42,7 +42,7 @@ const FilePreviewModal: FunctionComponent<Props> = observer(({ application, view
(event) => {
const KeysToHandle: string[] = [KeyboardKey.Left, KeyboardKey.Right, KeyboardKey.Escape]
if (!KeysToHandle.includes(event.key)) {
if (!KeysToHandle.includes(event.key) || event.target === renameInputRef.current) {
return
}