fix #3408 #3363: close popup on deletion