I’ve noticed that the editor-exposed On click event (really, the underlying active state) appears to be misbehaving if the mouse/touch moves after clicking down.
Specifically:
Tap/click on a button, don’t release. Note the visual state change. Then move your mouse/finger without releasing, but remaining over the button. Note the button has now changed state to normal (instead of remaining active). If you release now, the on click event doesn’t get fired.
Unless I’m missing something, this is rather unintuitive, as well as causes lots of missed clicks on a touch device. It also contradicts the documented behaviour of firing the on click if the button/touch is released on the same button pointer down was fired.
For now I’m getting around this by adding an event listener and using OnPointerClick.
Apologies, did a bit more testing to see if I could nail down any more details, and realised the issue appears to stem from the button being in a scrollview (currently the content is smaller than the scrollview, so it doesn’t scroll, which is why I’d forgotten about that bit).
That said, I wonder if there could be an alternate method of handling the pointer click event in the above case. There doesn’t appear to be a threshold setting for the ScrollRect component; perhaps that could help in such cases?
Just ran into the same problem.
Toggles and Buttons in my case. Slider and input fields seem to work just fine.
When they’re inside a scroll view the slightest movement of the cursor (touch input) while clicking(tapping) on them makes them go to Normal-mode. Wich makes it near impossible on mobile devices to land a hit on them, since the slightest finger move on the toggle/button then makes it not react at all.