{"action":"opened","issue":{"url":"https://api.github.com/repos/Narzerus/angular-permission/issues/290","repository_url":"https://api.github.com/repos/Narzerus/angular-permission","labels_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/290/labels{/name}","comments_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/290/comments","events_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/290/events","html_url":"https://github.com/Narzerus/angular-permission/issues/290","id":164833098,"number":290,"title":"Original $stateChangeStart event is not defaultPrevented if preventDefault() is called on $stateChangeStart event issued by angular-permission-ui","user":{"login":"neildux","id":5980583,"avatar_url":"https://avatars.githubusercontent.com/u/5980583?v=3","gravatar_id":"","url":"https://api.github.com/users/neildux","html_url":"https://github.com/neildux","followers_url":"https://api.github.com/users/neildux/followers","following_url":"https://api.github.com/users/neildux/following{/other_user}","gists_url":"https://api.github.com/users/neildux/gists{/gist_id}","starred_url":"https://api.github.com/users/neildux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neildux/subscriptions","organizations_url":"https://api.github.com/users/neildux/orgs","repos_url":"https://api.github.com/users/neildux/repos","events_url":"https://api.github.com/users/neildux/events{/privacy}","received_events_url":"https://api.github.com/users/neildux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-11T13:09:38Z","updated_at":"2016-07-11T13:09:38Z","closed_at":null,"body":"In the app where I'm using angular-permission-ui (v3.2.1), there is other code listening to the $stateChangeStart event that checks whether the user can leave the current state.\r\n\r\nCurrently, this event handler is invoked twice for each state transition - once for the $stateChangeStart event issued by angular-permission-ui and once for the original $stateChangeStart event issued by ui-router.\r\n\r\nIf preventDefault() is called on the event issued by angular-permission-ui then it prevents the state authorization and transition logic from being invoked. However, unless preventDefault() is also called on the original event then the state transition will still be made by ui-router.\r\n\r\nCurrently preventDefault() is only called on the original event if neither the $stateChangePermissionStart event nor the $startChangeStart event issued by angular-permission-ui has had preventDefault() called.\r\n\r\nShould angular-permission-ui be altered so that preventDefault() is always called on the original event issued by ui-router?\r\n\r\n"}}
{"actor":{"display_login":"neildux"}}