-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[preact/compat] Difference in how events are processed (floating-ui) #4373
Comments
Mind posting the codesandbox with Preact as well, then we can see if this was the case on every version, it does feel like this is maybe a state batching issue as it sometimes does work but sometimes not. |
I tried forking and modifying the original react example on codesandbox but I constantly run into weird issues. |
Describe the bug
There seems to be a difference between how preact/compat processes events and how React does it.
This appears to cause various issues in third party libraries such as floating-ui.
I attempted to port the floating-ui "DropdownMenu" preact example directly to use preact+htm.
To Reproduce
Port the floating-ui examples to use preact+htm.
I posted my attempt here (preact+htm+floating-ui has been bundled together for the simplicity of the example):
https://tidspunkt.dk/bugs/floatingpreact/
The original React version that works fine can be found and tested out here:
https://codesandbox.io/s/admiring-lamport-5wt3yg?file=/src/DropdownMenu.tsx
Steps to reproduce the behavior:
(Happens in both Chrome and Firefox, doesn't seem to be a browser issue)
floatingpreact.mp4
Expected behavior
The submenus should work like in the provided React example.
The text was updated successfully, but these errors were encountered: