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

pointer.leftButtonReleased() while holding RMB on DRAG_END reports false (wrong), instead of true (correct) value #6027

Closed
michalfialadev opened this issue Feb 28, 2022 · 1 comment · May be fixed by jonesrussell/nishman#6
Assignees

Comments

@michalfialadev
Copy link

michalfialadev commented Feb 28, 2022

Version

3.55.2

Windows 10

Description

....
.on(Phaser.Input.Events.DRAG_END, this.OnSceneDragEndHandler, this)
....

private OnSceneDragEndHandler(
    pointer: Phaser.Input.Pointer,
    gameObject: Phaser.GameObjects.GameObject): void
{
    // true if LMB was released and RMB was not held, false if LMB was released while RMB was held (!!!)
    console.log("pointer.leftButtonReleased()=",pointer.leftButtonReleased())
    // false if LMB was released and RMB was not held, false if LMB was released while RMB was held
    console.log("pointer.rightButtonReleased()=",pointer.rightButtonReleased())
}

Additional Information

The correct behavior would be to report pointer.leftButtonReleased() as true when LMB is released, while RMB, MMB, FWDMB, BACKMB (or any other buttons, keys, etc) are held. Pretty sure there are other permutations, where this might be causing problems, like holding LMB and releasing RMB (or other keys). Lastly, its expected this to work through other triggers (not just DRAG_END).

@phaserjs phaserjs deleted a comment from SlimHajRomdhane Mar 26, 2023
@zekeatchan zekeatchan self-assigned this Jun 14, 2024
@zekeatchan
Copy link
Collaborator

This issue has been resolved.

The Pointer now correctly checks for multiple mouse button presses.

This change will be reflected in the next Phaser update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants