Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: disable context menu in readonly mode

Ilian Sapundshiev0ee3b8ae3b51
diff --git a/app/components/LocationView.tsx b/app/components/LocationView.tsx
index 921b792ba..253cdcc33 100644
--- a/app/components/LocationView.tsx
+++ b/app/components/LocationView.tsx
@@ -113,6 +113,9 @@ const LocationView = React.memo((props: Props) => {
};
const handleLocationContextMenuClick = (event: any) => {
+ if (props.isReadOnlyMode) {
+ return true;
+ }
event.preventDefault();
event.stopPropagation();
setLocationDirectoryContextMenuAnchorEl(event.currentTarget);