question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 5.x two-way binding doesn't work on Firefox for Windows or OSX

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When using the latest version of Firefox (58 at the time of issue submission) on either Windows or OSX, I can’t get the model of my component to change on text input. I start with a clean project generated by the CLI, which I have the newest version of. I add an input to the generated app component, after including the FormsModule in my app.module.ts file, like so:

<input [(ngModel)]="title" placeholder="app name">

After starting the app with ng serve, I attempt to change the title of the app via the text box I created above. In Firefox on either Windows 10 or OSX Sierra (10.12.6), the title at the top of the page does not change in response to my input. But, if I switch to Chrome, the app works as expected, with the title matching the contents of that text input. I understand that, under the hood, this is no longer implemented as actual two-way data binding in Angular 2+. But it is my understanding that by using both [] and () around ngModel, I am declaring, in Angular 2+ language, what behaves/looks the same as two-way binding would have in AngularJS.

Expected behavior

I expect that the framework would support all major browsers on all major OSes.

Minimal reproduction of the problem with instructions

Steps to reproduce:

  1. Open the plunk provided below in Firefox 58 on a machine running either Windows 10 or OSX.
  2. Run the plunk and try to change the text in the input.
  3. It should be observed that the input changes, but the title does not.

Minimal Demo: http://plnkr.co/edit/YdAFv08aNZzqpbiSuI6e

What is the motivation / use case for changing the behavior?

I would like the browser I use to be supported by the framework so I don’t have to have two browsers open while trying to learn to use said framework. I would also expect that some of the users of my apps would also being using Firefox, and I would like my apps to work for them, as well.

Environment


Angular version: X.Y.Z


Angular version: 5.2.0

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version 58
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 8.9.4 
- Platform:  Windows 10, Mac 

Others:

Interestingly, Linux machines running Firefox do not seem to have this problem. I posted in the Angular gitter channel and other users reported that my code worked for them and that they were running Linux machines. These comments can be found here: https://gitter.im/angular/angular?at=5a6cfdedae53c159034279c5

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hundredrabcommented, Aug 6, 2018

@kyle-hall thanks for reporting your findings. I finally found the answer to why my code never seemed to work all those months ago when I first started Angular xD

1reaction
sandangelcommented, Jan 29, 2018

Different issue but same feeling https://github.com/angular/angular/issues/19712 Why only me can see this?

BTW, I cannot reproduce your issue too. Good luck bro.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular2 Two way bindings doesn't work on Firefox
I am a newee using Angular 2. I developped some forms with Typesript and it is working with Chrome but doesn't with FireFox...
Read more >
Browser support - Angular
Firefox, latest and extended support release (ESR) ; Edge, 2 most recent major versions ; Safari, 2 most recent major versions ; iOS,...
Read more >
Hidden browser window? | Firefox Support Forum
Open your file browser to this hidden location: Mac: *~/Library/Application Support/Firefox/Profiles; Linux: *~/.mozilla/firefox/Profiles ...
Read more >
Troubleshooting - ngx-extended-pdf-viewer
Please update the library zone.js to a current version. At the time of writing, that's 0.10.3. For some reason, the default setup of...
Read more >
Angular Binding from the Parent to the Child with a Proxy
... me how to set up Angular two way binding using only TypeScript. Angular doesn't make it easy, but I came up with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found