Skip to content

Commit

Permalink
Fixed #10992 - p-dropdown causes page to horizontally scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Dec 28, 2021
1 parent 2e6d834 commit 139f150
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ export class Dropdown implements OnInit,AfterViewInit,AfterContentInit,AfterView
let selectedListItem = DomHandler.findSingle(this.itemsWrapper, '.p-dropdown-item.p-highlight');

if (selectedListItem) {
selectedListItem.scrollIntoView({ block: 'nearest', inline: 'start' });
selectedListItem.scrollIntoView({ block: 'nearest', inline: 'center' });
}
}
}
Expand Down

0 comments on commit 139f150

Please sign in to comment.