Don't expand change panel on middle click

When middle clicking on the link to the change a user typically
doesn't want the item to expand/contract. Instead it should not react
on this event.

Change-Id: I663732887d0b7b6e13fe38da555e5a092d49f05f
Story: 2005895
Task: 33754
This commit is contained in:
Tobias Henkel 2020-01-17 13:00:06 +01:00
parent 9de4732fea
commit cb3ed6ed71
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,11 @@ class ChangePanel extends React.Component {
this.clicked = false
}
onClick () {
onClick (e) {
// Skip middle mouse button
if (e.button === 1) {
return
}
let expanded = this.state.expanded
if (!this.clicked) {
expanded = this.props.globalExpanded