To adapt for use on tablet and mobile could we include onTap events that are apart of React to these components?
isnt onclick/onpointerup the same? generally the good thing about pointerevents is that its one standard for all input methods: touch, trackpad, mouse, pen.
onPointerUp is equivalent to onMouseUp / touchEnd, not onClick / onTap, onTap handles the mouse down and up on a target.
using onPointerUp would allow you to touch a target drag your finger to a different target and then lift your finger, this would trigger the onPointerUp event on the second target even though you didn't initiate the event from it.
The developer would be required to manually create a custom event handler that detects using onPointerDown the target and cross check that target with the one from the onPointerUp event to see if they match and then process the functionality of the onPointerUp event if they do.
onTap would allow one event listener to be used to handle pointer events, using an onTap event does not dispatch the event if the initiated target does not match the final target.
makes sense, but then, isn't ontap the same as onclick, which at least with the mouse has the same behaviour you are describing (up must match the same target as down)?
makes sense, but then, isn't ontap the same as onclick, which at least with the mouse has the same behaviour you are describing (up must match the same target as down)?
onTap is a touch event not a mouse event, onClick normally works with both mouse and touch but only for one touch pointer and it does not contain the touches property in the event, however in this instance onClick does not trigger using touch devices due to I am guessing something within the Orbit controller or being within a canvas
i have heard, but it's hard for me to test mobile/native, i just dont know how. it would be nice if someone could look into onclick first to fix it, that would be a good start. ontap, im not opposed to it, but it would have to go in by contribution/PR.
Google Chrome offer the ability to simulate mobile / touch devices using their developer tools so you don't need a physical device to test, as for PR that could be an option but I don't currently have the time to look into this, if someone gets to a fix before I can take a look I would be all for that.
Most helpful comment
onPointerUp is equivalent to onMouseUp / touchEnd, not onClick / onTap, onTap handles the mouse down and up on a target.
using onPointerUp would allow you to touch a target drag your finger to a different target and then lift your finger, this would trigger the onPointerUp event on the second target even though you didn't initiate the event from it.
The developer would be required to manually create a custom event handler that detects using onPointerDown the target and cross check that target with the one from the onPointerUp event to see if they match and then process the functionality of the onPointerUp event if they do.
onTap would allow one event listener to be used to handle pointer events, using an onTap event does not dispatch the event if the initiated target does not match the final target.