Skip to content

Commit

Permalink
Merge pull request #5664 from error-four-o-four/issue5663
Browse files Browse the repository at this point in the history
Update p5.Element.js
  • Loading branch information
limzykenneth authored Apr 22, 2022
2 parents 0c188f4 + 595b47c commit 6e2303c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/p5.Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ p5.Element.prototype.mousePressed = function(fxn) {
this._pInst._setProperty('mouseIsPressed', true);
this._pInst._setMouseButton(event);
// Pass along the return-value of the callback:
return fxn.call(this);
return fxn.call(this, event);
};
// Pass along the event-prepended form of the callback.
p5.Element._adjustListener('mousedown', eventPrependedFxn, this);
Expand Down

0 comments on commit 6e2303c

Please sign in to comment.