components icon indicating copy to clipboard operation
components copied to clipboard

Autocomplete and page scroll

Open FilipeQ opened this issue 9 years ago • 6 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Autocomplete options should stay near input

What is the current behavior?

Autocomplete options don't change css top property when we scroll on the page. After scroll autocomplete options don't follow the input position.

What are the steps to reproduce?

https://plnkr.co/edit/I2TAghRrpbzmgQK5SsXd?p=preview

I use the material Docs plunker and add some fake scroll, to reproduce the problem.

FilipeQ avatar Feb 21 '17 11:02 FilipeQ

None of the Overlay utilising components does. There's a PR for a solution that will block scrolling while any overlay is open, but https://github.com/angular/material2/pull/1971 either there's some problem with it or the assignee is busy.

fxck avatar Feb 21 '17 16:02 fxck

I got around it by sticking a scroll dispatcher on the body and updating the position manually as the user scrolls, but there are some issues on iOS safari with fixed positioning when the keyboards open.

ronanbrett avatar Feb 22 '17 09:02 ronanbrett

@fxck would you mind sharing the code that fix it ? having the same issue here

pabx06 avatar Mar 16 '17 20:03 pabx06

It is perhaps a naive implementation but it seems like a stacking context would be one solution. What don't I get about what the overlay is providing?

dalemanthei avatar Mar 24 '17 18:03 dalemanthei

Now tracking via #4093

jelbourn avatar Apr 13 '17 22:04 jelbourn

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.