Get box object more safely
Send sendMouseEventToWindow instead of sendMouseEvent to send mouse events more safely