Ticket #6079: 6079.patch
| File 6079.patch, 1.7 KB (added by , 16 years ago) |
|---|
-
_source/plugins/find/dialogs/find.js
5 5 6 6 (function() 7 7 { 8 var isReplace; 9 8 10 function findEvaluator( node ) 9 11 { 10 return node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 && !node.isReadOnly();12 return node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 && ( !isReplace || !node.isReadOnly() ); 11 13 } 12 14 13 15 /** … … 282 284 this._.highlightRange = null; 283 285 }, 284 286 287 isReadOnly : function() 288 { 289 if ( !this._.highlightRange ) 290 return 0; 291 292 return this._.highlightRange.startContainer.isReadOnly(); 293 }, 294 285 295 moveBack : function() 286 296 { 287 297 var retval = this._.walker.back(), … … 518 528 replace : function( dialog, pattern, newString, matchCase, matchWord, 519 529 matchCyclic , isReplaceAll ) 520 530 { 531 isReplace = 1; 532 521 533 // Successiveness of current replace/find. 522 534 var result = false; 523 535 524 536 // 1. Perform the replace when there's already a match here. 525 537 // 2. Otherwise perform the find but don't replace it immediately. 526 538 if ( this.matchRange && this.matchRange.isMatched() 527 && !this.matchRange._.isReplaced )539 && !this.matchRange._.isReplaced && !this.matchRange.isReadOnly() ) 528 540 { 529 541 // Turn off highlight for a while when saving snapshots. 530 542 this.matchRange.removeHighlight(); … … 554 566 else 555 567 result = this.find( pattern, matchCase, matchWord, matchCyclic, !isReplaceAll ); 556 568 569 isReplace = 0; 570 557 571 return result; 558 572 } 559 573 };
