Ticket #5319: 5319_2.patch
File 5319_2.patch, 1.6 KB (added by , 14 years ago) |
---|
-
_source/plugins/find/dialogs/find.js
1 /* 1 /* 2 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ 5 5 6 6 (function() 7 7 { 8 function guardDomWalkerNonEmptyTextNode( node )8 function nonEmptyText( node ) 9 9 { 10 10 return ( node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 ); 11 11 } … … 13 13 /** 14 14 * Elements which break characters been considered as sequence. 15 15 */ 16 function checkCharactersBoundary ( node )16 function nonCharactersBoundary ( node ) 17 17 { 18 var dtd = CKEDITOR.dtd; 19 return node.isBlockBoundary( 20 CKEDITOR.tools.extend( {}, dtd.$empty, dtd.$nonEditable ) ); 18 return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary( 19 CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable ) ) ); 21 20 } 22 21 23 22 /** … … 84 83 { 85 84 var walker = 86 85 new CKEDITOR.dom.walker( range ); 87 walker[ 'evaluator' ] = guardDomWalkerNonEmptyTextNode; 86 walker.guard = matchWord ? nonCharactersBoundary : null; 87 walker[ 'evaluator' ] = nonEmptyText; 88 88 walker.breakOnFalse = true; 89 89 90 90 this._ = { … … 145 145 146 146 // Marking as match character boundaries. 147 147 if ( !currentTextNode 148 && checkCharactersBoundary( this._.walker.current ) )148 && !nonCharactersBoundary( this._.walker.current ) ) 149 149 this._.matchBoundary = true; 150 150 151 151 }