From bb3ec2788afea8aa3f10b9a92183669e00261d17 Mon Sep 17 00:00:00 2001 From: Sami Nieminen <60424348+stniemin@users.noreply.github.com> Date: Mon, 25 Apr 2022 11:30:06 +0300 Subject: [PATCH] Set the inline property of scrollIntoView to nearest (#1653) --- .../src/components/mgt-people-picker/mgt-people-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts b/packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts index 4225b849dd..818cf1a894 100644 --- a/packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts +++ b/packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts @@ -1661,7 +1661,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent { const focusedItem = peopleList.children[this._arrowSelectionCount] as HTMLElement; if (focusedItem) { focusedItem.classList.add('focused'); - focusedItem.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); + focusedItem.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' }); focusedItem.focus(); } }