twitter/bootstrap — pull request #4812 by blakeembrey (2012-08-29 12:09:34+00:00)
Title: Update dropdown jQuery plugin - submenus, touch and keyboard navigation

As the title says, this enables submenu navigation support to the keyboard (via regular tabbing when dropdown is open), via the keyboard shortcuts - added left and right arrows and via touch events which will fire much quicker and appear smoother by avoiding a click event. Also removed touchstart from triggering the keydown event - not sure why this was ever set?

Also clearmenus now also clear the submenus so when you open the menu back up there isn't a flicker where the submenu will be open from being focused on. The [esc] key will now clear the menus as well (and focus on the parent trigger) as this seems like appropriate behaviour.

If possible, could you advise me on a way I can make a unit test for this so I can have these changes accepted?