Firefox autofill doesn't trigger updating in Angular

UNCONFIRMED
Unassigned

Status

()

defect
UNCONFIRMED
5 years ago
5 months ago

People

(Reporter: Andrew, Unassigned)

Tracking

26 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(firefox31 affected, firefox32- affected, firefox33 affected, firefox34 affected, firefox49 affected, firefox-esr24 affected, firefox-esr31 affected)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131202182626

Steps to reproduce:

Because Firefox doesn't trigger events when it autofills a password, frameworks that depend on this to update databinding don't update the databound objects.

This seems to be a well-known issue, and common across all databinding frameworks.


Actual results:

The textbox autofills, but the framework cannot detect this, and so it never picks up the change.


Expected results:

Firefox should trigger the "this textbox changed" JS event, thus allowing the framework to detect the change.

See this bug on Angular where they are trying to work around this:
https://github.com/angular/angular.js/issues/1460

Comment 1

5 years ago
Seconded. This really is very very annoying.

Refer to this thread for more discussion on the topic: 
https://github.com/angular/angular.js/issues/1460

Comment 2

5 years ago
Agree, this really is annoying. And Chrome doesn't have this issue, so Firefox should fix this.

Comment 3

5 years ago
This is not just firefox's problem. Chrome has the same problem.

To know the reasons, head to the issue thread on Github.

Comment 4

5 years ago
By the way, the Platform field should not read "x86_64 Windows 7" as it is a core browser bug.
As a fact, my Firefox on Ubuntu (all versions since ~20, as that is when I wrote some code which made the bug apparent) have been affected by this bug.

Updated

5 years ago
I'm marking all versions as affected based on comment 4 but, given that this is an issue that has been in the browser for quite some time, I am not tracking for beta.

Comment 6

5 years ago
Follow the github issue

https://github.com/angular/angular.js/issues/1460#issuecomment-15781502

It seem to "regular autofill" and "password autofill" is different behavior.

In my previous post, I test Chrome 35 for Linux, "password autofill" not have this problem, not sure "regular autofill". But Firefox fail in "password autofill".

Comment 7

5 years ago
I've also reported this 6 years ago: https://bugzilla.mozilla.org/show_bug.cgi?id=430931

The response from dolske@mozilla.com was marking it as INVALID and saying that "Events shouldn't fire fire when JS modifies node values."
Comment hidden (spam)

Comment 9

3 years ago
Is this issue still reproducing on latest Firefox builds?
Component: Untriaged → Form Manager
Flags: needinfo?(Andrew)
Product: Firefox → Toolkit

Comment 10

3 years ago
Issue still present in 49.0.1 and React. The fact that this bug is still unconfirmed/needinfo after 3 years is beyond me. It's a major problem.
What this bug needs to move forward is for someone to list the relevant DOM events that Chrome fires and indicates which ones Firefox doesn't fire. i.e. we need to know what event Angular, web developers, and hopefully the HTML spec expect to be fired in this case.

IIRC we have a helper to fire some events upon filling but maybe pwmgr isn't using it.
(In reply to Matthew N. [:MattN] (away until Oct. 4) from comment #11)
> IIRC we have a helper to fire some events upon filling but maybe pwmgr isn't
> using it.

setUserInput[1] is what I was thinking about and pwmgr is already using it[2] so the fix may be to setUserInput.

According to a quick skim of setUserInput, we should be firing[3] at least the "input" and "change" events already.

[1] https://dxr.mozilla.org/mozilla-central/rev/c7d62e6d052c5d2638b08d480a720254ea09ff2d/dom/webidl/HTMLInputElement.webidl#200
[2] https://dxr.mozilla.org/mozilla-central/rev/c7d62e6d052c5d2638b08d480a720254ea09ff2d/toolkit/components/passwordmgr/LoginManagerContent.jsm#1108,1112
[3] https://dxr.mozilla.org/mozilla-central/rev/c7d62e6d052c5d2638b08d480a720254ea09ff2d/dom/html/HTMLInputElement.cpp#2744,2765,2771
Someone should also clarify if the problem is with password autofill or only autocomplete (e.g. on non-login fields). Attaching a testcase would help with that.
Isn't this a dupe for bug #87943?
(Reporter)

Comment 15

5 months ago
incorrect
Yup, it's a dupe of that bug.
Flags: needinfo?(Andrew)
(In reply to Alexandre Folle de Menezes from comment #14)
> Isn't this a dupe for bug #87943?

No, that bug pre-dates the current Form Autofill feature in Firefox and we do fire `change` events (along with `input`).
You need to log in before you can comment on or make changes to this bug.