close modal and copy tag