[webkit-dev] Unapplying execCommand
rniwa at webkit.org
Fri Oct 8 15:47:58 PDT 2010
I realized that the behavior of undo is different on WebKit and Chromium.
Namely on Safari, execCommand("undo") undoes all previous execCommands
while it undoes exactly one execCommand in Chromium.
For example, we if have
<div id="test" contenteditable>hello</div>
document.execCommand('bold', false, null);
document.execCommand('italic', false, null);
document.execCommand('undo', false, null);
WebKit will have the plain "hello" after the script is ran. i.e. hello is
neither boldened nor italicized. On Chromium, "hello" is boldened after the
script is ran, which is also consistent with Firefox, Internet Explorer, and
Opera (I have to add artificial delay for MSIE and Opera to execute undo
properly). I feel like this should be a bug and possibly a regression.
Does anyone know if this was a UI / functionality decision or it is a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev