twitter/bootstrap — pull request #7331 by FestivalBobcats (2013-03-19 16:44:06+00:00)
Title: Added optional boolean param "autoselect" to typeahead.js

This small change is crucial for a project I'm involved in, which requires search behavior similar to the style of Google Instant. By default, the first item in the list is selected ('active' class added) immediately after the dropdown is rendered. This causes the menu to assume focus in the search form, which means pressing the enter key to submit your query will not submit the form but rather just update the value of the input with the selected item.

I tried work around after work around to restore focus to the form while a menu was active to no avail. This option is working great, and I've updated the tests and docs to accomodate.