Skip to content

Commit

Permalink
[Glitch] Fix middle-click handling conflicting with automatic scrolling
Browse files Browse the repository at this point in the history
Port 9ff0140 to glitch-soc

Signed-off-by: Claire <[email protected]>
  • Loading branch information
ClearlyClaire committed Dec 22, 2024
1 parent d2fd516 commit 5b93331
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/javascript/flavours/glitch/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ 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;
}

this.handleClick(e);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,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 5b93331

Please sign in to comment.