Bug 7150

Summary: TinyMCE: Undo still enabled after a location change, crashes if performed
Product: WebKit Reporter: Chris Petersen <c.petersen87>
Component: HTML EditingAssignee: Justin Garcia <justin.garcia>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://tinymce.moxiecode.com/example_full.php?example=true
Bug Depends on:    
Bug Blocks: 6627    
Attachments:
Description Flags
patch mjs: review+

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.