Material: autocomplete: scroll doesn't return to top when dropdown is opened again

Created on 9 Mar 2017  路  9Comments  路  Source: angular/material

I'm trying to use md-autocomplete with md-chips scroll and it all works fine but after picking an item
from the drop down of the autocomplete when I start tyiping a new item to look for
the drop down scroll starts from the same position it last ended.
how do I make it start from the top of the drop down every time???

I've added my project if any one has a fix thank you
good-chips.zip

nice to have external contributor Pull Request fixed inconvenient bug polish

All 9 comments

capture
I added a picture of the problem

Please provide a codepen so we can investigate further.

I think it may be related to the md-autocomplete itself: https://material.angularjs.org/latest/demo/autocomplete
Open first autocomplete, scroll down, close, open once again. Scroll stays at the place you've last left it. Is there a way to scroll it to top for example on close?

I am facing the same issue.
Is there any workaround for this.??

Can reproduce this based on the docs and 1.1.7.

Hi @Splaktar

Please see the CodePen with my fix.
I could not see any CodePen with the autocomplete and chips I could use to reproduce the original issue.

@marosoft yeah, sorry, it looks like I either didn't save or I linked the wrong CodePen above. I've removed the link.

Here's a CodePen that demonstrates the issue without chips based on 1.1.11.

@marosoft your fix seems to work. Please go ahead and open a PR.

I was not able to reproduce the problem with autocomplete chips either.

Was this page helpful?
0 / 5 - 0 ratings