mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 14:33:34 +00:00
[ENG-1250] Fix windows mouse navigation (#1538)
Fix windows mouse navigation
This commit is contained in:
parent
5a30aa7f2f
commit
de341d0f2a
|
@ -23,6 +23,7 @@ export const NavigationButtons = () => {
|
|||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (os === 'windows') return; //windows already navigates back and forth with mouse buttons
|
||||
const onMouseDown = (e: MouseEvent) => {
|
||||
e.stopPropagation();
|
||||
if (e.buttons === 8) {
|
||||
|
@ -35,7 +36,7 @@ export const NavigationButtons = () => {
|
|||
};
|
||||
window.addEventListener('mousedown', onMouseDown);
|
||||
return () => window.removeEventListener('mousedown', onMouseDown);
|
||||
}, [navigate, idx, isFocused]);
|
||||
}, [navigate, idx, isFocused, os]);
|
||||
|
||||
return (
|
||||
<div data-tauri-drag-region={os === 'macOS'} className="flex">
|
||||
|
|
Loading…
Reference in a new issue