Bug 7508
Summary: | TinyMCE: Major regression in TinyMCE's Safari-specific selection code | ||
---|---|---|---|
Product: | WebKit | Reporter: | Justin Garcia <justin.garcia> |
Component: | HTML Editing | Assignee: | 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 |
Justin Garcia
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Justin Garcia
Filed:
https://sourceforge.net/tracker/index.php?func=detail&aid=1440124&group_id=103281&atid=635682
Darin Adler
*** Bug 8811 has been marked as a duplicate of this bug. ***
Darin Adler
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.
Darin Adler
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.
Maciej Stachowiak
TinyMCE says it is fixed in their CVS - someone should verify.
Maciej Stachowiak
Verified with http://tinymce.moxiecode.com/test/examples/example_full.htm