Skip to content

Commit

Permalink
Merge pull request #14040 from rosenthalj/master
Browse files Browse the repository at this point in the history
Fix  for PrimeNG 16.7.1 interacting with dropdown causes panel to scroll #14039
  • Loading branch information
cetincakiroglu authored Nov 8, 2023
2 parents 31e4f0b + 6ce74a7 commit 8aa8100
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 @@ -1421,7 +1421,7 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
if (this.itemsViewChild && this.itemsViewChild.nativeElement) {
const element = DomHandler.findSingle(this.itemsViewChild.nativeElement, `li[id="${id}"]`);
if (element) {
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' });
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
} else if (!this.virtualScrollerDisabled) {
setTimeout(() => {
this.virtualScroll && this.scroller?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
Expand Down

1 comment on commit 8aa8100

@vercel
Copy link

@vercel vercel bot commented on 8aa8100 Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.