Skip to content

Commit

Permalink
Allow browser context menu for images in reader (#524)
Browse files Browse the repository at this point in the history
The changes of dabe883 removed the ability to copy/open images in a new tab due to enabling scrolling via left mouse click and dragging the mouse.
  • Loading branch information
schroda authored Dec 28, 2023
1 parent 120e97e commit 356303a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/components/reader/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function imageStyle(settings: IReaderSettings): any {
height: 'auto',
maxHeight: '99vh',
objectFit: 'contain',
pointerEvents: 'none',
};
}

Expand All @@ -55,7 +54,6 @@ function imageStyle(settings: IReaderSettings): any {
minWidth: '50vw',
width: dimensions.width < dimensions.height ? '100vw' : '100%',
maxWidth: '100%',
pointerEvents: 'none',
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/util/SpinnerImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function SpinnerImage(props: IProps) {
return <Box sx={spinnerStyle} />;
}

return <img style={imgStyle} ref={imgRef} src={imageSrc} alt={alt} />;
return <img style={imgStyle} ref={imgRef} src={imageSrc} alt={alt} draggable={false} />;
}

SpinnerImage.defaultProps = {
Expand Down

0 comments on commit 356303a

Please sign in to comment.