Typo in fckdomrange_ie.js
|Reported by:||martinkou||Owned by:||martinkou|
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.
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