Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent group expansion arrow from activating group when expanding or collapsing #8785

Merged
merged 10 commits into from
May 22, 2022
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/gui/groups/GroupTreeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ private void initialize() {
if (event.getButton() == MouseButton.SECONDARY) {
// Prevent right-click to select group
event.consume();
} else if (event.getTarget() instanceof StackPane pane) {
if (pane.getStyleClass().toString().equals("arrow") || pane.getStyleClass().toString().equals("tree-disclosure-node")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to check for contains, because there could also be multiple style classes assigned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @calixtus , it has been updated with contains().
Really appreciate your review!

event.consume();
}
}
});

Expand Down