MouseHover to open Popup

Hello Everyone,
I wants to open the logout Popup while mouse hover into the username on my header view.
here I dropped my header view.


When I hover into my username the logout popup has to open. Using mouse hover event I opened the popup and using mouse leave event I closed the popup. When I move to click logout button the popup will close because the mouse is leave from username.
image
But I want to keep open the popup if my cursor on the popup view even its leaves from my username component in header view.
now I couldn’t achieve this. Kindly someone suggest solution to finish this.

IMHO it would be best to make the username a button (or onClick event) that opens the popup. That way it is pretty straight forward and the least confusing to the user.

If do want do it on hover however, you could make a session property that is set to true when the mouse enters the popup and set to false when it leaves the popup. Then on your mouse leave on the username in a script you would first check if that property is false, and if so only then close the popup with system.perspective.closePopup().

1 Like

What type of container structure is in use? If it’s all in a coordinate container you could have the button + popup all as one component or embedded view, make sure it’s on the top of the Z-order and resize it on mouse-in and mouse-out.

Thank you for your response @Daniel.Snyder

I am using Flex container. But anyway I achieved my requirement using session custom property.
Thank you so much for your kind response.