Bug 7150 - TinyMCE: Undo still enabled after a location change, crashes if performed
Summary: TinyMCE: Undo still enabled after a location change, crashes if performed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Justin Garcia
URL: http://tinymce.moxiecode.com/example_...
Keywords: InRadar
Depends on:
Blocks: 6627
  Show dependency treegraph
 
Reported: 2006-02-08 22:41 PST by Chris Petersen
Modified: 2006-03-02 11:38 PST (History)
0 users

See Also:


Attachments
patch (3.55 KB, patch)
2006-03-02 00:15 PST, Justin Garcia
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Petersen 2006-02-08 22:41:45 PST
After editing text in Tiny MCE then navigated to a different page, selecting undo typing from the Edit menu results in crash. This crash occurs with TOT Webkit.

 STEPS TO REPRODUCE
1. With TOT Webkit,  go to http://tinymce.moxiecode.com/example_full.php?example=true
2. Place caret in textarea field and type a few characters
3. Navigate to another page
4. Select Undo Typing from the Edit menu. A crash occurs.

RESULTS
Undo Typing should not be active after different page has been loaded. However, Undo Typing menu item is active and results in a crash when selected.
Comment 1 Chris Petersen 2006-02-08 22:43:24 PST
This bug is also in Radar as <rdar://4433765>
Comment 2 Justin Garcia 2006-03-02 00:15:38 PST
Created attachment 6806 [details]
patch

undo/redo operations registered by subframes weren't cleared on a location change.  clearUndoRedoOperations was only called from didOpenURL, and thus was only called for the main frame.  At first I tried calling it for all childFrames in didOpenURL, but by the time that didOpenURL is called, all of the subframes have already been detached/destroyed.  So I moved the call to clearUndoRedoOperations to closeURL, and it is now called for subframes as they are detached.