zenozeng/p5.js-svg

mouseClicked() triggers only when clicking outsite the canvas

alicericci opened this issue · 1 comments

function mouseClicked() {
  console.log("here");
}

When the mouse is pressed on the canvas, nothing happens, but when pressed outside the area of the canvas, "here" is logged
I suppose something is wrong with event bubbling

changed it to mousePressed() and it works