This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26612 - D3E defines input event should be fired immediately after the DOM as been updated but it shouldn't be so if the editor value is changed by setting value attribute
Summary: D3E defines input event should be fired immediately after the DOM as been upd...
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-20 07:26 UTC by Masayuki Nakano
Modified: 2015-01-21 20:37 UTC (History)
5 users (show)

See Also:


Attachments
testcase (854 bytes, text/html)
2014-08-20 07:35 UTC, Masayuki Nakano
Details

Description Masayuki Nakano 2014-08-20 07:26:16 UTC
Currently, D3E spec defines when input event should be fired as:

"A user agent MUST dispatch this event immediately after the DOM has been updated."

However, at setting value attribute of <input> or <textarea>, input event is not fired on Firefox, Chrome nor IE.

So, D3E needs to update its definition for conforming to implementations.

And I think that beforeinput definition should be changed too.
Comment 1 Masayuki Nakano 2014-08-20 07:35:33 UTC
Created attachment 1502 [details]
testcase

Using innerHTML for contenteditable editor doesn't cause firing input event too.
Comment 2 Olli Pettay 2014-08-20 07:36:22 UTC
Setting .value doesn't change the DOM, it changes the value of
the form control.
Comment 3 Anne 2014-08-20 07:41:56 UTC
But it should not fire synchronously. At best it should fire when mutation observers are dispatched.
Comment 4 Masayuki Nakano 2014-08-20 09:30:29 UTC
I think that input event caused by changes from JS isn't necessary for web apps. Therefore, I think that current implementations do make sense to me. So, I don't think that input event (and beforeinput event) should be fired for the cases in the testcase.
Comment 5 Ben Peters 2015-01-21 18:01:42 UTC
Copied to https://github.com/w3c/editing-explainer/issues/41

Please continue the conversation there.
Comment 6 Travis Leithead [MSFT] 2015-01-21 20:37:49 UTC
Bug has moved to Github issue tracking for Editing TF current work.