angular-ui/bootstrap — pull request #2273 by tmmueller (2014-05-28 18:08:27+00:00)
Title: Modal focus

This is based on pull request #1892 from @mlilli. I rebased and squashed it as @pkozlowski-opensource requested. I also made it re-apply focus to the first autofocus element so that it works if you open the modal more than once.