Enable up/down keys for navigating the ULS menu

This commit is contained in:
NikG
2022-11-07 12:53:39 +02:00
committed by Niklas Laxström
parent 0a0ebbf770
commit cd1452eb76
3 changed files with 89 additions and 0 deletions

View File

@@ -115,6 +115,14 @@
this.options.onSelect( query, e );
}
break;
case 38: // arrow up
this.options.lcd.navigateUp();
break;
case 40: // arrow down
this.options.lcd.navigateDown();
break;
}
},
@@ -163,6 +171,10 @@
results = [],
query = ( this.$element.val() || '' ).trim().toLowerCase();
// Reset the keyboard navigation index inside LanguageCategoryDisplay (lcd)
// before re-rendering the language options
this.options.lcd.resetNavigationIndex();
if ( query === '' ) {
this.options.lcd.setGroupByRegionOverride( null );
this.resultHandler( query, languages );