Skip to content

Conversation

@milesflavel
Copy link
Collaborator

Partially resolves #45 (comment) (bug from last bullet point)

@AlaricBaraou
Copy link
Collaborator

I'm not sure I understand this one.
I understand it can prevent a NaN but why would it remain stuck at [0,0] if the first one fail ?

@milesflavel
Copy link
Collaborator Author

milesflavel commented Feb 11, 2024

I'm not sure I understand this one. I understand it can prevent a NaN but why would it remain stuck at [0,0] if the first one fail ?

The problem arises when we check the value here https://github.com/pmndrs/react-three-a11y/pull/47/files#diff-32dc2dac919df01db7d6bf3121c0154e2f292742bf796529b3b19632da0dc7d7R143-R144

When the value is NaN, we never enter this condition, which means that we never update the value on this line https://github.com/pmndrs/react-three-a11y/pull/47/files#diff-32dc2dac919df01db7d6bf3121c0154e2f292742bf796529b3b19632da0dc7d7R155

Downstream this affects the rendered x,y positions, causing all elements to be rendered at a default position in the top-left corner perpetually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Touch events behave inconsistently with A11y

2 participants