Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(useMouchAndTouchTracker): add refs to effect deps #1609

Conversation

seedy
Copy link

@seedy seedy commented Jun 5, 2024

What:

Why: this ensures mouse and touch tracker effect is always up to date with its refs bindings.

How: added a dependency to a useEffect

Checklist:

  • Documentation N/A
  • Tests N/A
  • TypeScript Types N/A
  • Flow Types N/A
  • Ready to be merged

@silviuaavram
Copy link
Collaborator

Thank you for the PR, will take a look!

@aliceHendicott
Copy link
Contributor

@silviuaavram Any update on this one?

@silviuaavram
Copy link
Collaborator

Looked at it and I would try to avoid adding and removing event listeners on every render. I would propose this one instead.

#1612

@aliceHendicott @seedy could you confirm the fix, please? It should be available as 9.0.7-alpha.1, once we are good to go I will release 9.0.7 with the fix. Thank you!

@silviuaavram
Copy link
Collaborator

Actually just go for 9.0.7-alpha.2.

@SL-23
Copy link

SL-23 commented Jul 10, 2024

Hey @silviuaavram, thanks for getting an alpha release out. I forked @aliceHendicott's example and upgraded to 9.0.7-alpha.2, but it didn't fix the issue. This is my new sandbox for your reference. 🙏

Screen.Recording.2024-07-10.at.10.04.28.AM.mov

@silviuaavram
Copy link
Collaborator

Thanks for the sandbox! Will let you know once I get some updates on this one.

@silviuaavram
Copy link
Collaborator

Still looking into how to do it without adding and removing the handlers on each render. Will update on the progress.

@SL-23
Copy link

SL-23 commented Jul 22, 2024

Hi @silviuaavram 👀 wonder if there's any updates for this?

@silviuaavram
Copy link
Collaborator

silviuaavram commented Jul 25, 2024

9.0.7-alpha.3

@SL-23 let me know if it works now.
@aliceHendicott

@SL-23
Copy link

SL-23 commented Jul 26, 2024

Hey @silviuaavram it works now. Thank you so much!

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

Successfully merging this pull request may close these issues.

Dropdown items are not selectable on mobile devices when rendering to a portal element
4 participants