Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.5.3
[ckeditor.git]
/
_source
/
plugins
/
domiterator
/
plugin.js
diff --git
a/_source/plugins/domiterator/plugin.js
b/_source/plugins/domiterator/plugin.js
index
22815c4
..
5c092bb
100644
(file)
--- a/
_source/plugins/domiterator/plugin.js
+++ b/
_source/plugins/domiterator/plugin.js
@@
-31,7
+31,9
@@
CKEDITOR.plugins.add( 'domiterator' );
\r
var beginWhitespaceRegex = /^[\r\n\t ]+$/,
\r
// Ignore bookmark nodes.(#3783)
\r
\r
var beginWhitespaceRegex = /^[\r\n\t ]+$/,
\r
// Ignore bookmark nodes.(#3783)
\r
- bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true );
\r
+ bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ),
\r
+ whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ),
\r
+ skipGuard = function( node ) { return bookmarkGuard( node ) && whitespacesGuard( node ); };
\r
\r
// Get a reference for the next element, bookmark nodes are skipped.
\r
function getNextSourceNode( node, startFromSibling, lastNode )
\r
\r
// Get a reference for the next element, bookmark nodes are skipped.
\r
function getNextSourceNode( node, startFromSibling, lastNode )
\r
@@
-207,7
+209,7
@@
CKEDITOR.plugins.add( 'domiterator' );
// to close the range, otherwise we include the parent within it.
\r
if ( range && !closeRange )
\r
{
\r
// to close the range, otherwise we include the parent within it.
\r
if ( range && !closeRange )
\r
{
\r
- while ( !currentNode.getNext( bookmarkGuard ) && !isLast )
\r
+ while ( !currentNode.getNext( skipGuard ) && !isLast )
\r
{
\r
var parentNode = currentNode.getParent();
\r
\r
{
\r
var parentNode = currentNode.getParent();
\r
\r
@@
-215,7
+217,10
@@
CKEDITOR.plugins.add( 'domiterator' );
&& !parentPre && { br : 1 } ) )
\r
{
\r
closeRange = 1;
\r
&& !parentPre && { br : 1 } ) )
\r
{
\r
closeRange = 1;
\r
+ includeNode = 0;
\r
isLast = isLast || ( parentNode.equals( lastNode) );
\r
isLast = isLast || ( parentNode.equals( lastNode) );
\r
+ // Make sure range includes bookmarks at the end of the block. (#7359)
\r
+ range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END );
\r
break;
\r
}
\r
\r
break;
\r
}
\r
\r