From 6db00e029336add149d792c42ae5d54e83177087 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 26 Apr 2022 14:28:39 +0000 Subject: [PATCH] Revert "Merge branch 'allow-text-selection' into 'next'" This reverts merge request !1262 --- app/soapbox/components/status.tsx | 14 ++------------ app/soapbox/components/status_content.tsx | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index d24ebd0ce4..3ae18b8fc7 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -102,7 +102,6 @@ interface IStatus extends RouteComponentProps { } interface IStatusState { - isDragging: boolean, showMedia: boolean, statusId?: string, emojiSelectorFocused: boolean, @@ -129,7 +128,6 @@ class Status extends ImmutablePureComponent { ]; state: IStatusState = { - isDragging: false, showMedia: defaultMediaVisibility(this.props.status, this.props.displayMedia), statusId: undefined, emojiSelectorFocused: false, @@ -193,9 +191,7 @@ class Status extends ImmutablePureComponent { this.setState({ showMedia: !this.state.showMedia }); } - handleClick = (event: any): void => { - event.stopPropagation(); - + handleClick = (): void => { if (this.props.onClick) { this.props.onClick(); return; @@ -609,13 +605,7 @@ class Status extends ImmutablePureComponent { data-featured={featured ? 'true' : null} aria-label={textForScreenReader(intl, status, rebloggedByText)} ref={this.handleRef} - onMouseUp={() => { - if (!this.state.isDragging) { - this.props.history.push(statusUrl); - } - }} - onMouseDown={() => this.setState({ isDragging: false })} - onMouseMove={() => this.setState({ isDragging: true })} + onClick={() => this.props.history.push(statusUrl)} role='link' > {prepend} diff --git a/app/soapbox/components/status_content.tsx b/app/soapbox/components/status_content.tsx index 9f4308bf20..9cbafa67f0 100644 --- a/app/soapbox/components/status_content.tsx +++ b/app/soapbox/components/status_content.tsx @@ -67,7 +67,7 @@ interface IStatusContent { status: Status, expanded?: boolean, onExpandedToggle?: () => void, - onClick?: (event: React.MouseEvent) => void, + onClick?: () => void, collapsable?: boolean, } @@ -182,7 +182,7 @@ const StatusContent: React.FC = ({ status, expanded = false, onE } if (deltaX + deltaY < 5 && e.button === 0 && onClick) { - onClick(e); + onClick(); } startXY.current = undefined;