Dropdown - scroll to selected item #10346
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-yqtqpy-edcngr
Current behavior
When you open the dropdown, selected item is not in visible area
Expected behavior
Selected item should be in scrolled visible area.
Angular version: 11
PrimeNG version: 11.3
Browser: Chrome, Firefox
Possible issue:
From my observation, the issue seems to be connected to opening animation. At the beginning of the animation, DomHandler.scrollInView... is called. It measures dropdown panel and selected item position and set scroll height. But after this calculation, dropdown panel is expanded from 80% of height to 100%, so calculation was done on wrong height of the panel (80% instead of final 100%).
The text was updated successfully, but these errors were encountered: