You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
Steps to reproduce the behavior:
(Happens in both Chrome and Firefox, doesn't seem to be a browser issue)
Click to open the menu
Hover the mouse over "Copy as" and the submenu opens fine
Move the mouse over into the new submenu
Most of the time the submenu closes completely. Sometimes if you move very slow you can observe flicker as a lot of events are processed. Then you can move into the new menu. Any submenus from there will result in all the submenus closing.
floatingpreact.mp4
Expected behavior
The submenus should work like in the provided React example.
The text was updated successfully, but these errors were encountered:
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.
I'm not used to that entire technology stack (which is why I'm using no-compile preact with htm in the first place).
Hopefully it's not difficult for someone who has a little experience with it to quickly swap out react with preact in the example file.
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: