pmndrs / react-three-a11y

♿️ Accessibility tools for React Three Fiber
https://docs.pmnd.rs/a11y/introduction
Other
561 stars 16 forks source link

feat: handle touch start/end events as pointer over/out #46

Open milesflavel opened 11 months ago

milesflavel commented 11 months ago

Partially resolves https://github.com/pmndrs/react-three-a11y/issues/45#issuecomment-1879572601

AlaricBaraou commented 10 months ago

@milesflavel Do you mind explaining why we need onTouchStart / onTouchEnd ? I'm fine with the other changes of this PR

milesflavel commented 9 months ago

@milesflavel Do you mind explaining why we need onTouchStart / onTouchEnd ? I'm fine with the other changes of this PR

I was running into situations where touch would result in the hovered state being set true, but it would never set itself false again. By explicitly binding the onTouchStart & onTouchEnd events, it resolved this problem.

The issues were loosely described in https://github.com/pmndrs/react-three-a11y/issues/45