Skip to content

Commit

Permalink
Fix middle-click handling conflicting with automatic scrolling (masto…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Nov 29, 2024
1 parent 9296d58 commit 9ff0140
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class Status extends ImmutablePureComponent {
handleMouseUp = e => {
// Only handle clicks on the empty space above the content

if (e.target !== e.currentTarget) {
if (e.target !== e.currentTarget && e.detail >= 1) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/status_content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class StatusContent extends PureComponent {
element = element.parentNode;
}

if (deltaX + deltaY < 5 && (e.button === 0 || e.button === 1) && this.props.onClick) {
if (deltaX + deltaY < 5 && (e.button === 0 || e.button === 1) && e.detail >= 1 && this.props.onClick) {
this.props.onClick(e);
}

Expand Down

0 comments on commit 9ff0140

Please sign in to comment.