Skip to content

Commit

Permalink
DragListener should only stop dragging when touchUp matches the butto…
Browse files Browse the repository at this point in the history
…n it cares about. (#7389)
  • Loading branch information
NathanSweet committed Apr 28, 2024
1 parent a523316 commit b0a3e8b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -63,7 +63,7 @@ public void touchDragged (InputEvent event, float x, float y, int pointer) {
}

public void touchUp (InputEvent event, float x, float y, int pointer, int button) {
if (pointer == pressedPointer) {
if (pointer == pressedPointer && (this.button == -1 || button == this.button)) {
if (dragging) dragStop(event, x, y, pointer);
cancel();
}
Expand Down

0 comments on commit b0a3e8b

Please sign in to comment.