#3880: Typo in fckdomrange_ie.js
-----------------------+----------------------------------------------------
 Reporter:  martinkou  |       Owner:  martinkou      
     Type:  Bug        |      Status:  new            
 Priority:  Normal     |   Milestone:  FCKeditor 2.6.5
Component:  General    |     Version:                 
 Keywords:             |  
-----------------------+----------------------------------------------------
 Line 114 of fckdomrange_ie.js says
 {{{
         bIsStartMakerAlone = ( forceExpand ||
 !eStartMarker.previousSibling ||
 eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) &&
 !eStartMarker.nextSibing ;
 }}}

 Take note of the last property name, "nextSibing" - it's a very subtle
 error but this property does not exist. It is actually causing the
 statement after the "&&" sign to be redundant because it always returns
 true.

 This is actually the reason why we have this comment in CKEditor 3's
 selection plugin:
 {{{
 // The isStartMarkerAlone logic comes from V2. It guarantees that the
 lines
 // will expand and that the cursor will be blinking on the right place.
 // Actually, we are using this flag just to avoid using this hack in all
 // situations, but just on those needed.

 // But, in V3, somehow it is not interested on working whe hitting
 SHIFT+ENTER
 // inside text. So, let's jsut leave the hack happen always.

 // I'm still leaving the code here just in case. We may find some other IE
 // weirdness and uncommenting this stuff may be useful.
 }}}

 The isStartMarkerAlone flag doesn't work in v3 because the ported logic
 doesn't have that typo.

 The solution to this is to fix remove the wrong "nextSibing" condition
 from the line and also fix the "bIsStartMakerAlone" name typo - this one
 doesn't have any effect on logical correctness but is still spelled wrong.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/3880>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
_______________________________________________
FCKeditor-Trac mailing list
FCKeditor-Trac@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to