`Phaser.Input.Pointer.leftButtonReleased` returns true for pointerdown events
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 40.3k
- Forks
- 7.2k
- PR merge metrics
- No merged PRs in 30d
Description
Version
- Phaser Version: 3.85.0 - 4.0.0 RC6
- Operating system: all
- Browser: all
Description
When clicking with the left mouse button, Phaser.Input.Pointer.leftButtonReleased returns true for pointerdown events.
The change in ef6a9331b6b5ca94cb2f8259feeac3ce4fb47ba4 added a conditional assignment that is incorrect.
return this.buttons === 0 ? (this.button === 0 && !this.isDown) : this.button === 0;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the implementation of Phaser.Input.Pointer.leftButtonReleased and the change introduced by commit ef6a9331b6b5ca94cb2f8259feeac3ce4fb47ba. Reproduce a left-button pointerdown event and verify that leftButtonReleased is false there, while the corrected behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100