Message Meta: Remove fast click as it conflicts with outer handlers
This commit is contained in:
parent
f56d893135
commit
8d4d9c4822
@ -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;
|
||||||
|
|||||||
@ -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 && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user