Skip to content

Commit

Permalink
Accept input on mouse clicks outside an active TextFieldComponent.
Browse files Browse the repository at this point in the history
  • Loading branch information
nightm4re94 committed Dec 8, 2021
1 parent 350c137 commit 4a24304
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public TextFieldComponent(
Input.mouse()
.onClicked(
e -> {
if (!getBoundingBox().contains(Input.mouse().getLocation())) {
setSelected(false);
if (isSelected() && !getBoundingBox().contains(Input.mouse().getLocation())) {
acceptInput();
}
});

Expand Down

0 comments on commit 4a24304

Please sign in to comment.