mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-03-17 08:50:54 -04:00
[Glitch] Fix middle-click handling conflicting with automatic scrolling
Port 9ff01403ea03e4a56a0c11a054b8e7ebd0c22d87 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
d2fd51691a
commit
5b93331a48
@ -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);
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user