Skip to content

Commit 08c34c1

Browse files
authored
Merge pull request #1965 from mikewesthad/docs-mouse-clicked
mouseClicked() documentation clarification for addressing #1960
2 parents a8092c6 + 4e72015 commit 08c34c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/events/mouse.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,9 @@ p5.prototype._ondragover = p5.prototype._onmousemove;
654654
/**
655655
* The mouseClicked() function is called once after a mouse button has been
656656
* pressed and then released.<br><br>
657+
* Browsers handle clicks differently, so this function is only guaranteed to be
658+
* run when the left mouse button is clicked. To handle other mouse buttons
659+
* being pressed or released, see mousePressed() or mouseReleased().<br><br>
657660
* Browsers may have different default
658661
* behaviors attached to various mouse events. To prevent any default
659662
* behavior for this event, add "return false" to the end of the method.

0 commit comments

Comments
 (0)