diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index 5822fe708b..7b78148ec9 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -784,7 +784,8 @@ $message-padding-horizontal: 12px; &--nonclickable { cursor: inherit; - .module-image__image { + .module-image__image, + .module-image__border-overlay--with-click-handler { cursor: inherit; } } diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index c0ae364b5f..08b7eae6e3 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { createPortal } from 'react-dom'; import classNames from 'classnames'; import getDirection from 'direction'; -import { drop, groupBy, orderBy, take, unescape } from 'lodash'; +import { drop, groupBy, noop, orderBy, take, unescape } from 'lodash'; import { Manager, Popper, Reference } from 'react-popper'; import type { PreventOverflowModifier } from '@popperjs/core/lib/modifiers/preventOverflow'; @@ -1118,16 +1118,18 @@ export class Message extends React.PureComponent { 'module-message__link-preview--nonclickable': !isClickable, } ); - const onPreviewImageClick = () => { - if (first.image && !isDownloaded(first.image)) { - kickOffAttachmentDownload({ - attachment: first.image, - messageId: id, - }); - return; - } - openLink(first.url); - }; + const onPreviewImageClick = isClickable + ? () => { + if (first.image && !isDownloaded(first.image)) { + kickOffAttachmentDownload({ + attachment: first.image, + messageId: id, + }); + return; + } + openLink(first.url); + } + : noop; const contents = ( <> {first.image && previewHasImage && isFullSizeImage ? (