Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
When the user clicks away and then refocuses on an input element that has no autocomplete options to display and then changes the input until new options should display, the autocomplete panel should open and show these options.
What is the current behavior?
When the user clicks away and then refocuses on an input element that has no autocomplete options to display and then changes the input until new options should display, the autocomplete panel does not open. Additionally, if after this the user then clicks away again and refocuses on the input element, the autocomplete panel will display with the new options but will now be stuck open even if the user clicks away from the element.
What are the steps to reproduce?
Using the plunker example below:
- Click on the input element
- Enter a query that should display no results (ex: "alx")
- Click away from the input element
- Click on the input element
- Delete characters from the query until options should display (options won't display) (ex: "al")
One way:
6. Click away from the input element
7. Click on the input element (panel will now be stuck open)
Alternatively:
6. Delete another character from the query (options will now be shown but panel is stuck open) (ex: "a")
http://plnkr.co/edit/iCCPRa73JtY44xjB9QAQ is just the demo from the material.angular.io page on the material2 plunker template
What is the use-case or motivation for changing an existing behavior?
Improve user experience
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Reproduced using the material2 template plunker with the demo from the material.angular.io demo page.
Is there anything else we should know?
Behavior may be revealed by change #5446 since removing the panelOpen check seems to fix this issue (but may itself cause other issues such as the one this change was fixing).