diff --git a/src/react-image-lightbox.js b/src/react-image-lightbox.js
index ff8b2d7f..44d8862d 100644
--- a/src/react-image-lightbox.js
+++ b/src/react-image-lightbox.js
@@ -1377,37 +1377,25 @@ class ReactImageLightbox extends Component {
}
const imageSrc = bestImageInfo.src;
- if (discourageDownloads) {
- imageStyle.backgroundImage = `url('${imageSrc}')`;
- images.push(
-
- );
- } else {
- images.push(
-
e.preventDefault()}
- style={imageStyle}
- src={imageSrc}
- key={imageSrc + keyEndings[srcType]}
- alt={
- typeof imageTitle === 'string' ? imageTitle : translate('Image')
+ images.push(
+
{
+ if (discourageDownloads) {
+ e.preventDefault();
}
- draggable={false}
- />
- );
- }
+ }}
+ onWheel={this.handleImageMouseWheel}
+ onDragStart={e => e.preventDefault()}
+ style={imageStyle}
+ src={imageSrc}
+ key={imageSrc + keyEndings[srcType]}
+ alt={typeof imageTitle === 'string' ? imageTitle : translate('Image')}
+ draggable={false}
+ />
+ );
};
const zoomMultiplier = this.getZoomMultiplier();
diff --git a/src/style.css b/src/style.css
index 9c4dfa3c..27a618fb 100644
--- a/src/style.css
+++ b/src/style.css
@@ -51,12 +51,6 @@
touch-action: none;
}
-.ril__imageDiscourager {
- background-repeat: no-repeat;
- background-position: center;
- background-size: contain;
-}
-
.ril__navButtons {
border: none;
position: absolute;
@@ -90,16 +84,6 @@
no-repeat center;
}
-.ril__downloadBlocker {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
- background-size: cover;
-}
-
.ril__caption,
.ril__toolbar {
background-color: rgba(0, 0, 0, 0.5);