#3283: 'CKEDITOR.dom.node.getPreviousSourceNode/getNextSourceNode' bug
------------------------+---------------------------------------------------
Reporter: garry.yao | Owner: garry.yao
Type: Bug | Status: closed
Priority: Normal | Milestone: CKEditor 3.0
Component: General | Version:
Resolution: invalid | Keywords: Confirmed Review?
------------------------+---------------------------------------------------
Changes (by fredck):
* status: assigned => closed
* resolution: => invalid
Comment:
The original TCs are incorrect. Let me make some clarifications to justify
it.
Suppose we have the following structure:
{{{
<p><b>A</b>B</p><div>C</div>
}}}
These two functions must return the first "touched node", from LTR or RTL,
depending on the function.
So getNextSourceNode is supposed to return us the nodes in this order:
{{{
<p> -> <b> -> A -> B -> <div> -> C
}}}
getPreviousSourceNode instead is not supposed to give the exact opposite
of it, but to apply the same logic, reading the code from right to left:
{{{
<div> -> C -> <p> -> B -> <b> -> A
}}}
In this case, the "touch point" of the elements are their "end boundary".
It's also quite easy to understand the why of it. In the original TCs
conception, getPreviousSourceNode should return <p> by both <b> and <div>,
which is wrong as we need to different results for each one of them,
considering their different locations.
I've attached the correct TCs for it.
--
Ticket URL: <http://dev.fckeditor.net/ticket/3283#comment:9>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac