Re: before/after editaction

On Thu, Oct 20, 2011 at 6:57 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:

> I don't think we can make such an assumption. People mutate DOM on input
> event all the time:
> http://codesearch.google.com/#search/&q=%20oninput=&type=cs
>
> Including any DOM mutations in the on-going transaction would mean that UA
> will end up trying to revert those changes since the entire document shares
> the one undo scope by default, and may end up mutation DOM in unexpected
> ways.
>

I'll add that, most significantly, when reverting DOM changes made in the
input event listener fails, the UA may end up aborting the undo/redo process
before even get to revert the actual DOM changes made by the user editing
action or execCommand.

- Ryosuke

Received on Friday, 21 October 2011 02:03:12 UTC