adding onclose event for clicking modal x and hitting escape when hiding modal.  bugid-43207