Skip to content

Commit

Permalink
Change files
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Holt committed Apr 5, 2024
1 parent ea3e9f0 commit 588e78f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: prevent toolbar from stealing focus when focus has already been moved in the document",
"packageName": "@microsoft/fast-foundation",
"email": "=",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ export class Toolbar extends FoundationElement {

// If the previously active item is still focusable, adjust the active index to the
// index of that item.
const adjustedActiveIndex =
this.focusableElements.indexOf(previousFocusedElement);
const adjustedActiveIndex = this.focusableElements.indexOf(
previousFocusedElement
);
this.activeIndex = Math.max(0, adjustedActiveIndex);

this.setFocusableElements();
Expand Down

0 comments on commit 588e78f

Please sign in to comment.