Skip to content

Commit

Permalink
Follow-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajaxy committed Dec 20, 2024
1 parent 62c5884 commit fd58205
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/middle/message/WebPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
position: relative;

&_interactive {
cursor: pointer;
cursor: var(--custom-cursor, pointer);
transition: opacity 0.15s;

&:hover {
Expand Down
8 changes: 2 additions & 6 deletions src/components/middle/message/WebPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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 && (
Expand Down

0 comments on commit fd58205

Please sign in to comment.