angular-ui/bootstrap — pull request #1165 by frankamp (2013-10-15 17:55:00+00:00)
Title: Updates keydown to DRY out key codes via statics, prevent default on enter

Add statics for all hot keys, compose hot key array from them. Reuse them in the keydown function instead of repeating literals. Prevent default on enter, even when no matches are present.

I found that consuming the enter key at all times was a better usability expectation. Sometimes I would hit enter
more than once or mistimed it based on whether there were matches. I don't want to magically submit the form sometimes but not other times.