Skip to content

Commit

Permalink
Fix active item on focus (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
gossi authored Aug 5, 2024
1 parent 0f1a0d6 commit 0ab6e51
Show file tree
Hide file tree
Showing 28 changed files with 1,026 additions and 884 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export class ActiveDescendentStrategy implements NavigationPattern, FocusStrateg
}

handleFocus() {
const multiSelection =
this.control.capabilities.multiSelection && this.control.options.multiple;
// const multiSelection =
// this.control.capabilities.multiSelection && this.control.options.multiple;
const selectionPresent = this.control.selection.length > 0;

if (multiSelection && selectionPresent) {
if (selectionPresent) {
this.activateItem(this.control.selection[0]);
} else {
this.activateItem(this.control.items[0]);
Expand Down
272 changes: 0 additions & 272 deletions packages/aria-voyager/tests/listbox/multi-selection.test.ts

This file was deleted.

Loading

0 comments on commit 0ab6e51

Please # to comment.