Follow-up

This commit is contained in:
Alexander Zinchuk 2024-12-20 17:59:59 +01:00
parent 62c5884fbd
commit fd582054d7
2 changed files with 3 additions and 7 deletions

View File

@ -93,7 +93,7 @@
position: relative;
&_interactive {
cursor: pointer;
cursor: var(--custom-cursor, pointer);
transition: opacity 0.15s;
&:hover {

View File

@ -84,7 +84,7 @@ const WebPage: FC<OwnProps> = ({
onCancelMediaTransfer,
isEditing,
}) => {
const { openTelegramLink } = getActions();
const { openUrl, openTelegramLink } = getActions();
const webPage = getMessageWebPage(message);
const { isMobile } = useAppLayout();
// eslint-disable-next-line no-null/no-null
@ -150,10 +150,6 @@ const WebPage: FC<OwnProps> = ({
}
const isMediaInteractive = (photo || video) && onMediaClick && !isSquarePhoto;
function handleTextClick() {
window.open(url, '_blank', 'noopener');
}
const className = buildClassName(
'WebPage',
inPreview && 'in-preview',
@ -200,7 +196,7 @@ const WebPage: FC<OwnProps> = ({
{isArticle && (
<div
className={buildClassName('WebPage-text', !inPreview && 'WebPage-text_interactive')}
onClick={!inPreview ? handleTextClick : undefined}
onClick={!inPreview ? () => openUrl({ url, shouldSkipModal: true }) : undefined}
>
<SafeLink className="site-name" url={url} text={siteName || displayUrl} />
{!inPreview && title && (