Message Meta: Remove fast click as it conflicts with outer handlers

This commit is contained in:
Alexander Zinchuk 2023-05-02 16:07:35 +04:00
parent f56d893135
commit 8d4d9c4822
2 changed files with 2 additions and 6 deletions

View File

@ -22,13 +22,13 @@ import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
import useMedia from '../../hooks/useMedia'; import useMedia from '../../hooks/useMedia';
import useThumbnail from '../../hooks/useThumbnail'; import useThumbnail from '../../hooks/useThumbnail';
import useLang from '../../hooks/useLang'; import useLang from '../../hooks/useLang';
import { useFastClick } from '../../hooks/useFastClick';
import ActionMessage from '../middle/ActionMessage'; import ActionMessage from '../middle/ActionMessage';
import MessageSummary from './MessageSummary'; import MessageSummary from './MessageSummary';
import MediaSpoiler from './MediaSpoiler'; import MediaSpoiler from './MediaSpoiler';
import './EmbeddedMessage.scss'; import './EmbeddedMessage.scss';
import { useFastClick } from '../../hooks/useFastClick';
type OwnProps = { type OwnProps = {
className?: string; className?: string;

View File

@ -18,7 +18,6 @@ import MessageOutgoingStatus from '../../common/MessageOutgoingStatus';
import AnimatedCounter from '../../common/AnimatedCounter'; import AnimatedCounter from '../../common/AnimatedCounter';
import './MessageMeta.scss'; import './MessageMeta.scss';
import { useFastClick } from '../../../hooks/useFastClick';
type OwnProps = { type OwnProps = {
message: ApiMessage; message: ApiMessage;
@ -54,8 +53,6 @@ const MessageMeta: FC<OwnProps> = ({
const lang = useLang(); const lang = useLang();
const [isActivated, markActivated] = useFlag(); const [isActivated, markActivated] = useFlag();
const { handleClick, handleMouseDown } = useFastClick(onClick);
function handleImportedClick(e: React.MouseEvent) { function handleImportedClick(e: React.MouseEvent) {
e.stopPropagation(); e.stopPropagation();
@ -102,8 +99,7 @@ const MessageMeta: FC<OwnProps> = ({
<span <span
className={fullClassName} className={fullClassName}
dir={lang.isRtl ? 'rtl' : 'ltr'} dir={lang.isRtl ? 'rtl' : 'ltr'}
onClick={handleClick} onClick={onClick}
onMouseDown={handleMouseDown}
data-ignore-on-paste data-ignore-on-paste
> >
{isTranslated && ( {isTranslated && (