window auto-close after successful sharing