Skip to content

Autocomplete throws error in 2.0.0-beta.5 #4555

@jitsk

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.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions