Delay when moving mouse outside of pop-over

I have added an event handler “on right click” on a container, it opens a pop-over. Additionally, I want a 2 second delay on close; when the user is moving the mouse outside of the pop-over. I am struggling to implement this 2 second delay. Do you have any solutions for this?

Hi! If I understand your case correctly, this might work:

  1. Set up a container in your popover with the content of the popover inside it
  2. Set up an action “on hover end” on that container. In the action, set up an action node “sleep” with a value of 2000 before the “close popover” action node.

Hope that helps!

Sorry, I may have formulated the problem badly.

The problem we are facing is that we want the container not to close should the user move the mouse back to the container within two seconds, is there any way to achieve this?


I think this can be solved by checking if the boolean valute tracking “on hover” is true after the sleep and closing the popover if it is not. In this case it is important to run the “on hover start” and “on hover end” i parallell.

Thanks! But how can I check if the boolean value tracking “on hover” is true? And should this be checked with an if node in the action?

You can use a runtime boolean “Hover” variable, either in appvariables or on the datasource object in context.
“on hover start” updates the boolean to true.
“on hover end” updates tha boolean to false → sleeps for 2000 ms → If(“hover”) !=true ->close popover

With these to running in parallell the boolean “hover” will allways keep track if you hover or not so “the close popover” will only close if the cursor is still outside of the popover :slight_smile: And the close popover should be inside an if statement checking to boolean “hover” !=true

1 Like