Skip to content

Commit 502aba7

Browse files
committed
Merge branch 't/9662'
2 parents 0e06bd1 + 89e9c80 commit 502aba7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

core/dom/range.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,12 +2055,12 @@ CKEDITOR.dom.range = function( root ) {
20552055
return null;
20562056

20572057
var walker = new CKEDITOR.dom.walker( walkerRange ),
2058-
isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ),
2059-
isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
2060-
evaluator = function( node ) {
2061-
return isNotWhitespaces( node ) && isNotBookmarks( node );
2062-
};
2063-
walkerRange.evaluator = evaluator;
2058+
isNotBookmarks = CKEDITOR.dom.walker.bookmark( false, true ),
2059+
isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true );
2060+
2061+
walker.evaluator = function( node ) {
2062+
return isNotWhitespaces( node ) && isNotBookmarks( node );
2063+
};
20642064
var node = walker.next();
20652065
walker.reset();
20662066
return node && node.equals( walker.previous() ) ? node : null;

core/dom/walker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@
336336
* Whether the to-be-evaluated node is a bookmark node OR bookmark node
337337
* inner contents.
338338
*
339-
* @statick
340-
* @param {Boolean} [contentOnly=false] Whether only test againt the text content of
339+
* @static
340+
* @param {Boolean} [contentOnly=false] Whether only test against the text content of
341341
* bookmark node instead of the element itself (default).
342342
* @param {Boolean} [isReject=false] Whether should return `false` for the bookmark
343343
* node instead of `true` (default).
@@ -351,7 +351,7 @@
351351
return function( node ) {
352352
var isBookmark, parent;
353353
// Is bookmark inner text node?
354-
isBookmark = ( node && !node.getName && ( parent = node.getParent() ) && isBookmarkNode( parent ) );
354+
isBookmark = ( node && node.type != CKEDITOR.NODE_ELEMENT && ( parent = node.getParent() ) && isBookmarkNode( parent ) );
355355
// Is bookmark node?
356356
isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode( node );
357357
return !!( isReject ^ isBookmark );

0 commit comments

Comments
 (0)