Bug 7508

Summary: TinyMCE: Major regression in TinyMCE's Safari-specific selection code
Product: WebKit Reporter: Justin Garcia <justin.garcia>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ian, mozillabug321
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://tinymce.moxiecode.com/example.php?example=true
Bug Depends on:    
Bug Blocks: 6627    

Description Justin Garcia 2006-02-27 21:47:43 PST
In the TinyMCE 2.0.3 update, a change was made that broke editing operations to selected text when performed via a toolbar button.

Goto:
http://tinymce.moxiecode.com/example.php?example=true
Select some text, click the Bold button.  The selection is blown away and nothing becomes bold.

It sounds like some refactoring was done to the selection code between 2.0.2 and 2.0.3 by one of the TinyMCE contributor, which is probably where the regression was introduced.  I'm filing a bug against TinyMCE now and I'll attach a link to that bug shortly.
Comment 2 Darin Adler 2006-06-05 08:28:42 PDT
*** Bug 8811 has been marked as a duplicate of this bug. ***
Comment 3 Darin Adler 2006-06-05 08:29:17 PDT
It looks like this section of the moveToBookmark function is the buggy Safari-specific TinyMCE code:

    if (tinyMCE.isSafari) {
        sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset,
            bookmark.endContainer, bookmark.endOffset);
        return true;
    }

That should be bookmark.rng.startContainer, bookmark.rng.startOffset, etc. A bookmark doesn't have properties with those names.
Comment 4 Darin Adler 2006-06-05 08:55:55 PDT
I added some comments and a patch to the bug tracker for TinyMCE, but I don't know what it's going to take to get the attention of people working on the TinyMCE project.
Comment 5 Maciej Stachowiak 2006-08-12 22:20:58 PDT
TinyMCE says it is fixed in their CVS - someone should verify.
Comment 6 Maciej Stachowiak 2006-08-12 23:50:58 PDT
Verified with http://tinymce.moxiecode.com/test/examples/example_full.htm