Skip to content

Commit 6e7ee98

Browse files
committed
Menu: Add comment explaining extra filter from keypress
1 parent ef9a0c0 commit 6e7ee98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/jquery.ui.menu.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ $.widget( "ui.menu", {
229229
this.active.nextAll( ".ui-menu-item" ) :
230230
match;
231231

232-
// TODO: document what's going on here, character is reset to the original value
232+
// If no matches on the current filter, reset to the last character pressed
233+
// to move down the menu to the first item that starts with that character
233234
if ( !match.length ) {
234235
character = String.fromCharCode( event.keyCode );
235236
match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {

0 commit comments

Comments
 (0)