Opened 8 years ago

Closed 8 years ago

#3880 closed Bug (fixed)

Typo in fckdomrange_ie.js

Reported by: martinkou Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.6.5
Component: General Version:
Keywords: Review+ Cc:


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.

Attachments (1)

3880.patch (1.6 KB) - added by martinkou 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by martinkou

comment:1 Changed 8 years ago by martinkou

  • Keywords Review? added
  • Status changed from new to assigned

comment:2 Changed 8 years ago by garry.yao

  • Keywords Review+ added; Review? removed

comment:3 Changed 8 years ago by martinkou

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [3811].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy