Close tab only works with the mouse events down/up on the same tab