mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-05 02:10:13 +00:00
Fix middle-click handling conflicting with automatic scrolling (#33106)
This commit is contained in:
parent
9296d58024
commit
9ff01403ea
|
@ -173,7 +173,7 @@ class Status extends ImmutablePureComponent {
|
||||||
handleMouseUp = e => {
|
handleMouseUp = e => {
|
||||||
// Only handle clicks on the empty space above the content
|
// Only handle clicks on the empty space above the content
|
||||||
|
|
||||||
if (e.target !== e.currentTarget) {
|
if (e.target !== e.currentTarget && e.detail >= 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ class StatusContent extends PureComponent {
|
||||||
element = element.parentNode;
|
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);
|
this.props.onClick(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue