Opened 16 years ago
Closed 16 years ago
#3880 closed Bug (fixed)
Typo in fckdomrange_ie.js
Reported by: | Martin Kou | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6.5 |
Component: | General | Version: | |
Keywords: | Review+ | Cc: |
Description
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)
Change History (4)
Changed 16 years ago by
Attachment: | 3880.patch added |
---|
comment:1 Changed 16 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
comment:2 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [3811].
Click here for more info about our SVN system.