Use window events to allow mouse events from outside of the dom element, when the cursor leaves the window