Closed rijk closed 4 years ago
Issue is not super pressing by the way, in the end I used a Transition
to delay exit during the submenu animation, so the problem went away. But if it's an easy fix, would be nice to fix.
Hi Rijk, good to see you again :)
Recently someone has reported a similar issue (#15). I forked your sandbox and upgraded react-laag from 1.3 to 1.5.1 (latest), and that seems to solve your issue.
Problem was that the event-listener (closeOnOutsideClick
) was a bit late too the party whenever the layer's content changed, so now closeOnOutsideClick
listens in the 'capture' phase, so it's early too the party ;)
Please let me know if there's anything else!
🙈
Hi Erik, me again ;) I ran into an issue while creating a menu with submenus. See this codesandbox: https://codesandbox.io/s/react-laag-sub-menus-k3kfn
Expected behaviour: menu doesn’t close.