Components: md-autocomplete does not trigger the md-option-list-view in Firefox v. 45~

Created on 15 Aug 2017  路  5Comments  路  Source: angular/components

What is the expected behavior?

On click in the input-field with binded "mdAutocomplete", the list with md-options should open up.

What is the current behavior?

In Firefox Version 45~ the click event will not be triggered and the list-items (md-options) will not open up. The issue does not appear in the latest Firefox Version.

What are the steps to reproduce?

It can be reproduced with Firefox 45.2.0 on your examples page on https://material.angular.io/components/autocomplete/examples.

onclick: nothing happens in Firefox 45.2.0 (works on every other browser)
keyup: the list is shown - as expected

autocomplete

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

Angular Version 4.3.1
Material Version 2.0.0-beta.8
TypeScript Version: 2.4.2
Firefox Version 45.2.0

All 5 comments

We only officially support the most recent two versions for major browsers. The current version of Firefox is 54, so 45 is a bit too far back for us to track this.

Hi, you can try element.dispatchEvent( new Event( "input" ) );

Example:
<input matInput placeholder="Example" aria-label="Example" [matAutocomplete]="auto" [formControl]="example" (click)="onClickAutocomplete($event)">

onClickAutocomplete($event){
    const element = document.getElementById($event.target.id);
    element.dispatchEvent( new Event( "input" ) );
  }

https://stackblitz.com/edit/angular-lswqfd?file=app%2Fautocomplete-overview-example.ts

I have experienced this with the latest version of Firefox 51.0.1 - is there a solution?

I have experienced this with the latest version of Firefox 51.0.1 - is there a solution?

I tested my solution and it worked well

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shlomiassaf picture shlomiassaf  路  3Comments

alanpurple picture alanpurple  路  3Comments

constantinlucian picture constantinlucian  路  3Comments

crutchcorn picture crutchcorn  路  3Comments

savaryt picture savaryt  路  3Comments