Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
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

@donmccurdy

Description

@donmccurdy

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.

8a9433e9-b36d-4610-b9f7-df55beccfbbf-53059-0000b996c0587dad

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.8
  • Angular Material Version: 1.1.1

Additional Information:

  • Browser Type: * Chrome.
  • Browser Version: * 53.0.2785.97
  • OS: * Android 7.0
  • Stack 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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions