From: kborchers Date: Fri, 1 Jun 2012 04:03:51 +0000 (-0500) Subject: Menu: Add comment explaining extra filter from keypress X-Git-Tag: 1.9.0-beta.1~78 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6e7ee9860356d203e75086a1ca92864fe1d9f246;p=jquery-ui.git Menu: Add comment explaining extra filter from keypress --- diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index daae776c0..4bcfbfdb2 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -229,7 +229,8 @@ $.widget( "ui.menu", { this.active.nextAll( ".ui-menu-item" ) : match; - // TODO: document what's going on here, character is reset to the original value + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character if ( !match.length ) { character = String.fromCharCode( event.keyCode ); match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {