diff --git a/tdrive/frontend/src/app/views/client/viewer/drive-preview.tsx b/tdrive/frontend/src/app/views/client/viewer/drive-preview.tsx index e98c194c0..a68554f26 100644 --- a/tdrive/frontend/src/app/views/client/viewer/drive-preview.tsx +++ b/tdrive/frontend/src/app/views/client/viewer/drive-preview.tsx @@ -66,8 +66,11 @@ export const DrivePreview: React.FC = ({ items }) => { if (items.length < 2) // eslint-disable-next-line @typescript-eslint/no-empty-function return () => {}; - addShortcut({ shortcut: 'Right', handler: handleSwitchRight }); - addShortcut({ shortcut: 'Left', handler: handleSwitchLeft }); + + if (!status.loading) { + addShortcut({ shortcut: 'Right', handler: handleSwitchRight }); + addShortcut({ shortcut: 'Left', handler: handleSwitchLeft }); + } return () => { removeShortcut({ shortcut: 'Right', handler: handleSwitchRight });