Add onMouseUp event for hiding cursor