[editing-explainer] 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 (#41)

Copied from DOML3 Bugzilla https://www.w3.org/Bugs/Public/show_bug.cgi?id=26612

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.


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing-explainer/issues/41

Received on Wednesday, 21 January 2015 17:55:30 UTC