зеркало из https://github.com/mozilla/gecko-dev.git
52b0fcc9a1
As far as testing on Chrome, they don't dispatch any events during setting text control value (including `compositionupdate` and `compositionend`). However, we dispatch `compositionupdate`, `compositionend`, `beforeinput` and `input` synchronously. Therefore, `input` event listener may run again with the old value. This may make web apps confused because they may not expect the nested `input` event listener call which is not caused by user intention nor a `Document.execCommand` call. Therefore, we should stop dispatching the nested `beforeinput` and `input` events which are caused by committing composition for setting value since the value will be updated soon, so, the input caused by committing composition does not occur actually. However, `compositionend` event should be fired even in the nested event loop because the web apps may manage whether they has a composition with a pair of `compositionstart` and `compositionend` event listeners even though that won't work on Chrome. Additionally, the nested `compositionupdate` and `compositionend` event may cause a `Document.execCommand` call. However, that must be unexpected behavior for web apps and anyway the value will be overwritten to the new value. Therefore, let's make `Document::ExecCommand` do nothing in the situation. Differential Revision: https://phabricator.services.mozilla.com/D213756 |
||
---|---|---|
.. | ||
composer | ||
docs | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.sys.mjs | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |