]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Add comment explaining extra filter from keypress
authorkborchers <kris.borchers@gmail.com>
Fri, 1 Jun 2012 04:03:51 +0000 (23:03 -0500)
committerkborchers <kris.borchers@gmail.com>
Fri, 1 Jun 2012 04:03:51 +0000 (23:03 -0500)
ui/jquery.ui.menu.js

index daae776c05a1448cf73e3ad3ca8b27b56f3d598d..4bcfbfdb2a4125c23e7289e47b7fce4501ad9dcd 100644 (file)
@@ -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() {