X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Ffind%2Fdialogs%2Ffind.js;h=b4196fa5e98ec4e21f80a367bb08d43e36b60f1c;hp=cc1c2c1a78445e35a66919c6a8bd0d519816e1e8;hb=8761695d9b70afe75905deaac88f78c1f8aeb32d;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91 diff --git a/_source/plugins/find/dialogs/find.js b/_source/plugins/find/dialogs/find.js index cc1c2c1..b4196fa 100644 --- a/_source/plugins/find/dialogs/find.js +++ b/_source/plugins/find/dialogs/find.js @@ -425,7 +425,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var finder = { searchRange : null, matchRange : null, - find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched ) + find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun ) { if( !this.matchRange ) this.matchRange = @@ -480,10 +480,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license this.matchRange.removeHighlight(); // Clear current session and restart with the default search // range. - if ( matchCyclic ) + // Re-run the finding once for cyclic.(#3517) + if ( matchCyclic && !cyclicRerun ) { this.searchRange = getSearchRange( true ); this.matchRange = null; + return arguments.callee.apply( this, + Array.prototype.slice.call( arguments ).concat( [ true ] ) ); } return false;