menu
menu copied to clipboard
Menus close too early
I created the menu as shown in the attachment but when I am navigating the sub menus all the sub menus shutdown if I go back up the menu tree.
To recreate
- Hover over sub menu
- Hover over sub menu2
- Hover over sub menu 2
- Hover over sub sub menu 2
- move cursor back to previous sub menu The whole tree will collapse
Please can you tell me if I am doing something wrong or I need to do this in a different way?
Thanks
Keith Menu Problem.txt
sry for the late response.
move cursor back to previous sub menu
Do you mean the last sub menu 2 or the root menu? If it's the root menu, collapsing the whole tree is the expected behavior. Otherwise, however, I did not see moving cursor back to sub menu 2 from step 5 collapsing the entire menu.

Currently, it's possible a rare time sensitive issue. Moving between popups could sometimes end up in closing all submenu due to: https://github.com/react-component/trigger/blob/master/src/index.js#L237 where
onPopupMouseLeave = (e) => {
// https://github.com/react-component/trigger/pull/13
// react bug?
if (e.relatedTarget && !e.relatedTarget.setTimeout &&
this._component &&
this._component.getPopupDomNode &&
contains(this._component.getPopupDomNode(), e.relatedTarget)) { <===== e.relatedTarget become the outter container rather than the subpopup.
return;
}
this.delaySetPopupVisible(false, this.props.mouseLeaveDelay);
The issue has been seen with React 15. A potential solution would be using :after to increase the target area, i.e. removing the gap.
Did yo make this change and is it now available to try