angular-ui/bootstrap — pull request #514 by IanShoe (2013-06-10 15:13:21+00:00)
Title: Fixing Dialog handleLocationChange

Fixing the handleLocationChange event to first check if a dialog is currently open before attempting to close. Prior to, any location changes would attempt to close dialogs regardless of their state and would have negative impact such as decrementing the activeBackDrop counter past 0. This would break future backdrops.

*Note* this is only seen after the 'locationChangeSuccess' listener has been registered (through instantiation)

Steps to reproduce bug:

1. http://angular-ui.github.io/bootstrap/#/dialog
2. Open and close a dialog (this will register the listener)
3. Choose a different directive in the navbar dropdown (Fires a location change event within angular)
4. Go back and open a new dialog and there will be no backdrop