ivaynberg/select2 — pull request #610 by MaxxSoftware (2012-11-28 06:54:54+00:00)
Title: Firefox Tab and Enter keys issue.

Problems:
1. When item is selected by enter, the list is reopened.
2. Also pressing tab on focused element with drop list cause immediate reopening with empty search result list.
Condition:
This issue occurs only on master.
Reason:
This problem occurred because Firefox catches the Tab and Enter keys in the keypress event. And e.which return zero when Tab key is pressed.
Note:
It was described here #461 and here #570 (with examples).
Probably it was broken in commit 4b1204c, because right before this commit (on version 908c358) it works fine.

I tested it on IE7, IE8, IE9, FireFox 16.0.2 (MacOs), Chrome 23.0.1271.91(MacOs) and Safari 6.0.1(MacOs).