Bug 7059 - TinyMCE: Select All + delete sends you Back intsead of deleting
Summary: TinyMCE: Select All + delete sends you Back intsead of deleting
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: Nobody
URL:
Keywords: EasyFix
Depends on:
Blocks: 6627
  Show dependency treegraph
 
Reported: 2006-02-03 16:34 PST by Justin Garcia
Modified: 2006-03-01 21:51 PST (History)
0 users

See Also:


Attachments
patch (10.49 KB, patch)
2006-03-01 18:41 PST, Justin Garcia
no flags Details | Formatted Diff | Diff
patch (10.50 KB, patch)
2006-03-01 19:03 PST, Justin Garcia
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Garcia 2006-02-03 16:34:40 PST
Goto: http://tinymce.moxiecode.com/example.php?example=true
Click inside the first text area, select all, delete.

Safari sends you back to the previous page instead of deleting the contents of the text area.
Comment 1 Justin Garcia 2006-02-13 23:22:35 PST
We select iframes and other special elements when their contents are fully selected, to make them easier to delete when they occur in an editable region.  I think that's what's happening here.  Since the special element itself isn't editable, the delete key is responded to with a Back instead of a delete operation.
Comment 2 Justin Garcia 2006-03-01 18:41:36 PST
Created attachment 6799 [details]
patch

In selectFrameElementInParentIfFullySelected, we should only select the frame in its parent if the frame is in an editable region.  

Also, WebCore wasn't treating mouse events that the eventSender was sending as distinct events, since they all had the same eventNumber (0).  This was sending us into different code paths than we get into when a user does mouse clicks.  So, I added an eventNumber to the eventSender and increment it every time DRT creates an event.
Comment 3 Justin Garcia 2006-03-01 19:03:16 PST
Created attachment 6801 [details]
patch

small tweak