{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5648","repository_url":"https://api.github.com/repos/angular-ui/bootstrap","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5648/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5648/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5648/events","html_url":"https://github.com/angular-ui/bootstrap/issues/5648","id":141638411,"number":5648,"title":"Add config option for dropdown to not close on $locationChangeSuccess","user":{"login":"rmckeel","id":4602573,"avatar_url":"https://avatars.githubusercontent.com/u/4602573?v=3","gravatar_id":"","url":"https://api.github.com/users/rmckeel","html_url":"https://github.com/rmckeel","followers_url":"https://api.github.com/users/rmckeel/followers","following_url":"https://api.github.com/users/rmckeel/following{/other_user}","gists_url":"https://api.github.com/users/rmckeel/gists{/gist_id}","starred_url":"https://api.github.com/users/rmckeel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmckeel/subscriptions","organizations_url":"https://api.github.com/users/rmckeel/orgs","repos_url":"https://api.github.com/users/rmckeel/repos","events_url":"https://api.github.com/users/rmckeel/events{/privacy}","received_events_url":"https://api.github.com/users/rmckeel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/needs:%20info","name":"needs: info","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-17T16:40:52Z","updated_at":"2016-03-18T17:51:36Z","closed_at":"2016-03-17T19:33:41Z","body":"Howdy, this is an excellent library - thanks for your hard work on it!\r\n\r\nI've run across a feature (really, a configuration option) I think would be helpful to add.  We have something that constantly updates $location.search with a new hash, e.g. one moment it will be myPage?hash=1234 then the next moment it will change to myPage?hash=5678.\r\n\r\nUnless auto-close on dropdowns is disabled, it will automatically close the dropdowns.  I was working around this by having something watch and re-open the dropdowns, but this is certainly not ideal.  I'd prefer not to maintain a fork with only this feature, and I think this will be useful for others to have this as an option.  Updating the location is a fairly normal thing these days, and if it is a page location change (such as in a single page application), Angular would already destroy the controller and directive, meaning this code doesn't seem to help too much in normal cases (but perhaps I'm not normal and not thinking of normal cases ;)\r\n\r\nWhat would you think of a config option to ignore $locationChangeSuccess?  I could create a PR given some simple guidance (such as what / how you'd like the option called).\r\n\r\nHere's the relevant code in [dropdown.js](https://github.com/angular-ui/bootstrap/blob/master/src/dropdown/dropdown.js)\r\n```\r\n  $scope.$on('$locationChangeSuccess', function() {\r\n    if (scope.getAutoClose() !== 'disabled') {\r\n      scope.isOpen = false;\r\n    }\r\n  });\r\n```"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/198469398","html_url":"https://github.com/angular-ui/bootstrap/issues/5648#issuecomment-198469398","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5648","id":198469398,"user":{"login":"rmckeel","id":4602573,"avatar_url":"https://avatars.githubusercontent.com/u/4602573?v=3","gravatar_id":"","url":"https://api.github.com/users/rmckeel","html_url":"https://github.com/rmckeel","followers_url":"https://api.github.com/users/rmckeel/followers","following_url":"https://api.github.com/users/rmckeel/following{/other_user}","gists_url":"https://api.github.com/users/rmckeel/gists{/gist_id}","starred_url":"https://api.github.com/users/rmckeel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmckeel/subscriptions","organizations_url":"https://api.github.com/users/rmckeel/orgs","repos_url":"https://api.github.com/users/rmckeel/repos","events_url":"https://api.github.com/users/rmckeel/events{/privacy}","received_events_url":"https://api.github.com/users/rmckeel/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T17:51:36Z","updated_at":"2016-03-18T17:51:36Z","body":"@icfantv Hey, thanks for your response.  Yes, I understand limited time all too well - and that's what I was saying I could make the change / PR.  However, it appears to not be of interest as an additional setting, or auto-close=\"outsideClickNoLocationChange\" or some such.  Understandable.\r\n\r\nThanks - I hadn't thought of a wrapper directive to prevent a broadcast from further trickling down - great idea!  Clean, doesn't require forking the repo and keeping that updated, doesn't require my hack (where I use `is-open` and change state back to what it was just after it closes).\r\n\r\nThanks for the idea on wrapper directive - I'll give that a go.  Cheers and thanks for your hard work on this."}}