New issue
Advanced search Search tips

Issue 680507 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Extensions or Devs programmatically setting values of input fields will not result in the input field dispatching a change event

Reported by alex.m.s...@gmail.com, Jan 12 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Steps to reproduce the problem:
1. Attach text input to DOM.
2. Run a script that waits for some amount of time, then sets the value of that input to some string.
3. See that no change or input or any event is dispatched.

What is the expected behavior?
That since the value of the input changes, some change event is dispatched.

What went wrong?
Since there is technically no DOM change, no change event gets dispatched.

Did this work before? No 

Does this work in other browsers? No
 Here is a thread going on 15 years at Mozilla:

https://bugzilla.mozilla.org/show_bug.cgi?id=87943

The issue seems to be that while explaining the bug, Mozilla assumes OP is talking about the browsers autocomplete features when in reality we are talking about cases where an input's value is changed programmatically either through server side rendering, password managers, other extensions, etc... 

Chrome version: 55.0.2883.95  Channel: stable
OS Version: OS X 10.12.2
Flash Version: 

Please for the love of Pete make this a thing

:)
 
Components: -Blink>Input Blink>Forms

Comment 2 by tkent@chromium.org, Jan 13 2017

Status: WontFix (was: Unconfirmed)
As for normal web pages, programatical value change should not trigger input/change event.  It's defined by the standard, and all browsers agree on it for many years.  We can't change this behavior.

I think calling input.dispatchEvent(new Event('change', ...)) manually after value change would be enough.


When has a pesky standard ever governed the way browsers implement features
before? :)

I think I mentioned it in the issue, and they definitely mentioned it on
the Mozilla thread, but with the proliferation of password managers, we
devs don't always have the luxury of dispatching an event ourselves.

In practice it feels like a bug, as a member of the standards body could
you (Chromium) assist me in escalating this completely standards compliant
bug up the chain of command?

Thanks!

Sign in to add a comment