{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/7824","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/7824/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/7824/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/7824/events","html_url":"https://github.com/driftyco/ionic/issues/7824","id":172444976,"number":7824,"title":"Ionic 2: Confirm button with role:cancel does not fire on android back button","user":{"login":"daveshirman","id":14280030,"avatar_url":"https://avatars.githubusercontent.com/u/14280030?v=3","gravatar_id":"","url":"https://api.github.com/users/daveshirman","html_url":"https://github.com/daveshirman","followers_url":"https://api.github.com/users/daveshirman/followers","following_url":"https://api.github.com/users/daveshirman/following{/other_user}","gists_url":"https://api.github.com/users/daveshirman/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshirman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshirman/subscriptions","organizations_url":"https://api.github.com/users/daveshirman/orgs","repos_url":"https://api.github.com/users/daveshirman/repos","events_url":"https://api.github.com/users/daveshirman/events{/privacy}","received_events_url":"https://api.github.com/users/daveshirman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/driftyco/ionic/labels/alert","name":"alert","color":"fbca04"},{"url":"https://api.github.com/repos/driftyco/ionic/labels/needs:devicetesting","name":"needs:devicetesting","color":"c7def8"},{"url":"https://api.github.com/repos/driftyco/ionic/labels/platform:android","name":"platform:android","color":"009800"},{"url":"https://api.github.com/repos/driftyco/ionic/labels/v2","name":"v2","color":"313744"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-22T12:53:20Z","updated_at":"2016-09-06T12:29:31Z","closed_at":null,"body":"#### Short description of the problem:\r\nWhen presenting an alert since beta 11, if the user presses the Android hardware back button, the `role: 'cancel'` handler is not fired.\r\n\r\nIn previous beta versions, this was fired.\r\n\r\n#### What behavior are you expecting?\r\nFor the Android back button to fire the handler with `role: 'cancel'`\r\n\r\n**Steps to reproduce:**\r\n1. Put the code below on a page linked to a button\r\n2. Notice that when pressing hardware back button, alert is not fired.\r\n\r\n\r\n```\r\nlet confirm = this._alertController.create({\r\n        title: 'Do You agree?',\r\n        message: 'Please say whether you agree',\r\n        buttons: [\r\n          {\r\n            role: 'cancel',\r\n            text: 'Disagree',\r\n            handler: () => {\r\n              alert('cancelled')\r\n            }\r\n          },\r\n          {\r\n            text: 'Agree',\r\n            handler: () => {\r\n            }\r\n          }\r\n        ]\r\n});\r\nconfirm.present();\r\n```\r\n\r\n**Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)\r\n \r\n\r\n**Which Ionic Version?** 1.x or 2.x\r\n2.x\r\n\r\n#### Plunker that shows an example of your issue\r\nSorry, but I can't show this in a plunkr as it requires the android hardware button.\r\n\r\n\r\n**Run `ionic info` from terminal/cmd prompt:** (paste output below)\r\nDavids-Air:AppHazard daveshirman$ ionic info\r\n\r\nYour system information:\r\n\r\nCordova CLI: 6.2.0\r\nIonic Framework Version: 2.0.0-beta.11\r\nIonic CLI Version: 2.0.0-beta.32\r\nIonic App Lib Version: 2.0.0-beta.18\r\nios-deploy version: 1.8.6 \r\nios-sim version: 5.0.8 \r\nOS: Mac OS X El Capitan\r\nNode Version: v4.3.0\r\nXcode version: Xcode 7.2.1 Build version 7C1002 \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/244935015","html_url":"https://github.com/driftyco/ionic/issues/7824#issuecomment-244935015","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/7824","id":244935015,"user":{"login":"daveshirman","id":14280030,"avatar_url":"https://avatars.githubusercontent.com/u/14280030?v=3","gravatar_id":"","url":"https://api.github.com/users/daveshirman","html_url":"https://github.com/daveshirman","followers_url":"https://api.github.com/users/daveshirman/followers","following_url":"https://api.github.com/users/daveshirman/following{/other_user}","gists_url":"https://api.github.com/users/daveshirman/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshirman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshirman/subscriptions","organizations_url":"https://api.github.com/users/daveshirman/orgs","repos_url":"https://api.github.com/users/daveshirman/repos","events_url":"https://api.github.com/users/daveshirman/events{/privacy}","received_events_url":"https://api.github.com/users/daveshirman/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T12:29:31Z","updated_at":"2016-09-06T12:29:31Z","body":"Hi, any news on this? Anyone??"}}
{"actor":{"display_login":"daveshirman"}}