Reset mouseIsPressed on window blur#8559
Conversation
Thanks @ksen0, kept it minimal for exactly that reason. Only resets mouseIsPressed, nothing else. mouseButton is untouched so any code branching on which button was held still sees the same state it did before. The change is 4 lines in pointer.js's presetup ...same { signal: this._removeSignal } cleanup pattern the other listeners there already use, so no new teardown logic needed either. If there are side effects to watch for, happy to add a note in the PR description calling it out explicitly so reviewers know what to poke at, lmk |
davepagurek
left a comment
There was a problem hiding this comment.
Thanks @avinxshKD, this seems like a reasonable fix that doesn't look like it has the potential to break too much. @ksen0 maybe we want to specifically loop in p5live when testing the next RC just to double check?
Resolves #8552
mouseIsPressed would stay true if you held a mouse button, alt-tabbed out, released, and came back , pointerup never fires when the window doesn't have focus. Added a blur listener in pointer.js that resets it. 4 lines, same cleanup pattern (_removeSignal) as every other listener in that file.
npm run lintpasses