Windows Surface Pen does not work with "Button"

Windows surface Pen seems to work with all kinds of controls in a JUCE GUI application except the Button objects.

Works on drop down boxes, menu items, Right-click menu items work as well (albeit positioned at the wrong place), but tapping the button, any kind of button, with the pen, does not work.

Tapping on a button with a finger does work.

To reproduce just use the latest Projucer (5.4.1) and try to click on any button with your pen on a Windows Surface computer.

Is this being worked on? Should we expect a fix for it or should I roll up my sleeves, dig in, and try to see what’s actually going on?

1 Like

I am experiencing the same. Any resolution?

In Button::isMouseOrTouchOver, changing

if (e.source.isTouch ())
    return getLocalBounds ().toFloat ().contains (e.position);


if (e.source.isTouch () || e.source.isPen ())
    return getLocalBounds ().toFloat ().contains (e.position);

appears to resolve the issue. I might rename the method as well…

Thanks for reporting