This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
mdAutocomplete menu is above input in unexpected cases #9769
Copy link
Copy link
Closed
Labels
has: Pull RequestA PR has been created to address this issueA PR has been created to address this issuetype: enhancement
Milestone
Description
Actual Behavior:
What is the issue? *
On mobile sites with a fixed header, the mdAutocomplete menu can render above the input and be mostly obscured behind the fixed header. This seems to be a calculated choice, based on where there is more room in the viewport. However, since the viewport height changes when the keyboard is opened in Android (to my understanding?) this can lead to weird results. Specifically, I am testing in a Nexus 5X. Slight differences in device height could make a difference here.What is the expected behavior?
It would be great if the menu could always magically appear in the ideal location. Short of such magic, an option forcing it to render beneath the input would be fine. :)
CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:
Demo and source.Details:
Testing on Nexus 5X. The issue hinges somewhat on device height.
I've tried forcing the input to scroll farther up when focused, but this seemed to introduce some bad side effects. The searchbar is the entrypoint to my app, so I'd like for it to be as usable as possible.
Can this be fixed with some existing md-position-mode
-ish directives? Or, would you accept a PR adding an option to mdAutocomplete? If so, is there a syntax/naming you would recommend?
Angular Versions: *
Angular Version:
1.5.8Angular Material Version:
1.1.1
Additional Information:
Browser Type: *
Chrome.Browser Version: *
53.0.2785.97OS: *
Android 7.0Stack Traces:
Shortcut to create a new CodePen Demo.
Note: *
indicates required information. Without this information, your issue may be auto-closed.
Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.
Metadata
Metadata
Assignees
Labels
has: Pull RequestA PR has been created to address this issueA PR has been created to address this issuetype: enhancement