Restore closing of popup on blur