RESOLVED FIXED 61340
Undo gets broken in contenteditable area when a text field's value is set by script
https://bugs.webkit.org/show_bug.cgi?id=61340
Summary Undo gets broken in contenteditable area when a text field's value is set by ...
Ryosuke Niwa
Reported 2011-05-23 20:41:57 PDT
Reproduction steps: 1. Open the attached demo 2. Type something into the black box. 3. Undo Expected result: Undo works. Actual result: Undo doesn't work.
Attachments
demo (347 bytes, text/html)
2011-05-23 22:46 PDT, Ryosuke Niwa
no flags
fixes the bug (4.63 KB, patch)
2011-05-24 12:18 PDT, Ryosuke Niwa
darin: review+
Ryosuke Niwa
Comment 1 2011-05-23 20:42:22 PDT
This is why simple-rte.rniwa.com doesn't work properly on WebKit / Chrome.
Ryosuke Niwa
Comment 2 2011-05-23 22:46:02 PDT
Created attachment 94567 [details] demo Apparently, I forgot to attach the test case earlier. It turned out that this bug is nothing to with event handler. The problem reproduces whenever you modify input element's value.
Ryosuke Niwa
Comment 3 2011-05-24 11:49:43 PDT
Of course this is broken because we call clearUndoRedoOperations() in RenderTextControl::setInnerTextValue. Relevant changesets: http://trac.webkit.org/changeset/15565 http://trac.webkit.org/changeset/29748
Ryosuke Niwa
Comment 4 2011-05-24 12:18:42 PDT
Created attachment 94662 [details] fixes the bug
Ryosuke Niwa
Comment 5 2011-05-24 12:52:40 PDT
Thanks for the review, Darin. Landing it now.
Ryosuke Niwa
Comment 6 2011-05-24 14:22:32 PDT
Daniel Bates
Comment 7 2013-12-02 14:19:38 PST
*** Bug 48665 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.