@@ -67,6 +67,11 @@ export default {
67
67
this .toggleMenu ();
68
68
break ;
69
69
}
70
+ if (event .key === ' ArrowDown' || event .key === ' ArrowUp' ) {
71
+ const item = document .activeElement ; // try to highlight the selected commits
72
+ const commitIdx = item ?.matches (' .item' ) ? item .getAttribute (' data-commit-idx' ) : null ;
73
+ if (commitIdx ) this .highlight (this .commits [commitIdx ]);
74
+ }
70
75
},
71
76
onKeyUp(event ) {
72
77
if (! this .menuVisible ) return ;
@@ -226,10 +231,11 @@ export default {
226
231
</div >
227
232
</div >
228
233
<span v-if =" !isLoading" class =" info text light-2" >{{ locale.select_commit_hold_shift_for_range }}</span >
229
- <template v-for =" commit in commits " :key =" commit .id " >
234
+ <template v-for =" ( commit , idx ) in commits " :key =" commit .id " >
230
235
<div
231
236
class =" item" role =" menuitem"
232
237
:class =" {selected: commit.selected, hovered: commit.hovered}"
238
+ :data-commit-idx =" idx"
233
239
@keydown.enter.exact =" commitClicked(commit.id)"
234
240
@keydown.enter.shift.exact =" commitClickedShift(commit)"
235
241
@mouseover.shift =" highlight(commit)"
@@ -292,11 +298,6 @@ export default {
292
298
background-color : var (--color-accent );
293
299
}
294
300
295
- .ui.dropdown.diff-commit-selector .menu > .item :focus {
296
- color : var (--color-text );
297
- background : var (--color-hover );
298
- }
299
-
300
301
.ui.dropdown.diff-commit-selector .menu .commit-list-summary {
301
302
max-width : min (380px , 96vw );
302
303
}
0 commit comments