File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2055,12 +2055,12 @@ CKEDITOR.dom.range = function( root ) {
2055
2055
return null ;
2056
2056
2057
2057
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
+ } ;
2064
2064
var node = walker . next ( ) ;
2065
2065
walker . reset ( ) ;
2066
2066
return node && node . equals ( walker . previous ( ) ) ? node : null ;
Original file line number Diff line number Diff line change 336
336
* Whether the to-be-evaluated node is a bookmark node OR bookmark node
337
337
* inner contents.
338
338
*
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
341
341
* bookmark node instead of the element itself (default).
342
342
* @param {Boolean } [isReject=false] Whether should return `false` for the bookmark
343
343
* node instead of `true` (default).
351
351
return function ( node ) {
352
352
var isBookmark , parent ;
353
353
// 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 ) ) ;
355
355
// Is bookmark node?
356
356
isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode ( node ) ;
357
357
return ! ! ( isReject ^ isBookmark ) ;
You can’t perform that action at this time.
0 commit comments