cancel caption button click if the cursor is moved outside the button