Apple Pencil not triggering correctly with addMouseListener

Apple Pencil is not triggering in the same way as a finger tap when passing events with a addMouseListener.

So, I have a simple JUCE button with onClick call set and with the default triggerOnMouseDown = false;

I have a transparent component on top of it on which I call addMouseListener (&simpleButton, true);

If I tap with my finger on this transparent component, the onClick call of the button s triggered correctly.
Instead, if I tap with the Apple Pencil it’s not triggered as both wasDown and wasOver in the button mouseUp method are set to false.

The workaround is to use setTriggeredOnMouseDown (true); on the button. As in the mouseDown call isDown() is true.

I think that’s a bug, and the behavior of the Apple Pencil tap should be the same as with a finger tap.

1 Like