Skip to content

Autocomplete throws error in 2.0.0-beta.5 #4555

Closed

Description

@jitsk

Bug, feature request, or proposal:

Bug

What is the expected behavior?

User must be able to type in the input and based on input autocomplete must appear.

What is the current behavior?

When user clicks in the input field, error is thrown and UI halts, i.e md-autocomplete option is shown but on click nothing happens. The error in console is:
Uncaught TypeError: Cannot read property '_elementRef' of null at material.es5.js:19969 at FilterSubscriber._next (filter.js:81) at FilterSubscriber.Subscriber.next (Subscriber.js:89) at HTMLDocument.handler (FromEventObservable.js:134) at ZoneDelegate.invokeTask (zone.js:414) at Zone.runTask (zone.js:181) at HTMLDocument.ZoneTask.invoke (zone.js:476)

What are the steps to reproduce?

Added an input field(not mdInput) and associated an autocomplete with it.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 4.0.1
Angular material: 2.0.0-beta.5
Not working in any of the browsers Tested in Firefox, Chrome ,IE11.

Is there anything else we should know?

Was working fine in material 2.0.0-beta.2 . I decided to change because autocomplete was not working in IE11(Issue 4258).
The input field is in a MdDialog.

Activity

  1. willshowell commented on May 15, 2017

    @willshowell
    Contributor

    Plunker? I suspect using mdInput is required, but not 100% on that

  2. crisbeto commented on May 15, 2017

    @crisbeto
    Member

    mdInput shouldn't be required @willshowell, but it looks like I missed a null check in #3188.

  3. self-assigned this
    on May 15, 2017
  4. added a commit that references this issue on May 15, 2017
    1783d73
  5. added
    P3
    on May 15, 2017
  6. added a commit that references this issue on May 17, 2017
    e6f7ace
  7. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions