fix: Fixed issue where using arrow keys while renaming file would navigate to another file
This commit is contained in:
@@ -42,7 +42,7 @@ const FilePreviewModal: FunctionComponent<Props> = observer(({ application, view
|
|||||||
(event) => {
|
(event) => {
|
||||||
const KeysToHandle: string[] = [KeyboardKey.Left, KeyboardKey.Right, KeyboardKey.Escape]
|
const KeysToHandle: string[] = [KeyboardKey.Left, KeyboardKey.Right, KeyboardKey.Escape]
|
||||||
|
|
||||||
if (!KeysToHandle.includes(event.key)) {
|
if (!KeysToHandle.includes(event.key) || event.target === renameInputRef.current) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user