#2757: Selection is not restored properly from bookmark2 in this case.
------------------------------+---------------------------------------------
 Reporter:  jor...@…          |       Owner:     
     Type:  Bug               |      Status:  new
 Priority:  Normal            |   Milestone:     
Component:  General           |     Version:     
 Keywords:                    |  
------------------------------+---------------------------------------------
 If you have a non-intrusive bookmark of a text selection that has a
 previous sibling that is not a text node FCK will not re-select it
 properly. The problem is that the bookmark creation code assumes the
 previous sibling will be a text node and it will break the bookmark if it
 is not.

 These changes to the while loops fix it (fckdomrange.js line 477):

 Old:
 {{{
 while ( curStart && addrStart.nodeType == 3 )
 while ( curEnd && addrEnd.nodeType == 3 )
 }}}

 New:
 {{{
 while ( curStart && curStart.nodeType == 3 && addrStart.nodeType == 3 )
 while ( curEnd && curEnd.nodeType == 3 && addrEnd.nodeType == 3 )
 }}}

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2757>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to