Ticket #2419 (reopened Bug)
MoveToAncestorNode does not return the correct node
| Reported by: | henrylyne | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | FCKeditor 2.6.3 Beta |
| Keywords: | Confirmed | Cc: |
Description
This seems to be a problem in IE7 and Safari. FCK.Selection.MoveToAncestorNode does not return the correct node, or SelectNode doesn't properly select.
Steps to recreate:
1. Edit source and add
<div><p><b>bbbbbbb</b><br /><i>iiiiiiiiiii</i></p></div>
Switch back to the regular editor view.
2. Select "iiiiiiiiiii".
3. Run the following via the browser address bar:
javascript: alert(frames[0].FCK.Selection.SelectNode( frames[0].FCK.Selection.MoveToAncestorNode('DIV') ));
javascript: alert(frames[0].FCK.InsertHtml('abcd'));
4. View Source
- IE7 has the following:
<div><p><b>abcd</b><br /> </p></div>
- Safari has:
<div><p>abcd</p></div>
Output should look like:
abcd
Change History
Note: See
TracTickets for help on using
tickets.