p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

Fix #6847: Update mouseButton value when one mouse button is released

Open Renatolo opened this issue 2 years ago • 3 comments

Resolves #6847

Changes:

  • Modified src/events/mouse.js to correctly update the mouseButton value upon releasing one mouse button.
  • Updated documentation in src/events/mouse.js accordingly.
  • Added unit test in test/unit/events/mouse.js to cover scenario described in the issue.
  • Now mouseButton should have the value corresponding to the last mouse button pressed/released

Screenshots of the change: (no screenshots)

PR Checklist

Renatolo avatar Apr 06 '24 08:04 Renatolo

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

welcome[bot] avatar Apr 06 '24 08:04 welcome[bot]

This technically changes the behavior of the property and is a breaking change. I don't think I can accept this solution because of it.

limzykenneth avatar May 28 '24 14:05 limzykenneth

This technically changes the behavior of the property and is a breaking change. I don't think I can accept this solution because of it.

Thank you for spending time reviewing my PR, I looked further into this issue and learnt that the main reason that the mouseButton was not updated after a mouse release event due to possible problems caused by the context menu being opened... Should I try to make it so that the context menu woulndt interfere in its value (with it still being the default behaviour) or would it still be a breaking change?

Renatolo avatar Jun 19 '24 17:06 Renatolo