Skip to content

Commit

Permalink
fix: apply keyboard focus when removing selected person or adding per…
Browse files Browse the repository at this point in the history
…son from suggestion list on people-picker (#3011)

* fix keyboard focus when removing or adding person from suggestion list

* remove cursor in single-select

* remove unecessary keydown function

---------

Co-authored-by: Musale Martin <martinmusale@microsoft.com>
  • Loading branch information
Mnickii and musale authored Feb 12, 2024
1 parent 3d893b2 commit 8c8b138
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1200,9 +1200,6 @@ export class MgtPeoplePicker extends MgtTemplatedTaskComponent {
}
return p.id !== person.id;
});
if (this.hasMaxSelections) {
this.enableTextInput();
}
this.selectedPeople = filteredPersonArr;
void this.loadState();
}
Expand All @@ -1216,6 +1213,7 @@ export class MgtPeoplePicker extends MgtTemplatedTaskComponent {
protected handleRemovePersonKeyDown(person: IDynamicPerson, e: KeyboardEvent): void {
if (e.key === 'Enter') {
this.removePerson(person, e);
this.enableTextInput();
}
}

Expand Down Expand Up @@ -1243,6 +1241,7 @@ export class MgtPeoplePicker extends MgtTemplatedTaskComponent {
this._foundPeople = [];
this._arrowSelectionCount = -1;
}
this.enableTextInput();
}
}

Expand Down

0 comments on commit 8c8b138

Please sign in to comment.