Automatically dismisses the alert view when the app enters the background if there's a cancel button.