Skip to content

Commit f278394

Browse files
committed
When Esc is used within Find window - return to text editor
1 parent ba634bb commit f278394

3 files changed

Lines changed: 63 additions & 59 deletions

File tree

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
<form name="findAndReplace" onSubmit="ICEcoder.findReplace(top.document.getElementById('find').value,false,true);return false">
267267
<div class="findReplace">
268268
<div class="findText"><?php echo $t['Find'];?></div>
269-
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace(top.document.getElementById('find').value,true,false)">
269+
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace(top.document.getElementById('find').value,true,false,event.keyCode == 27)">
270270

271271
<div class="selectWrapper" style="width: 41px">
272272
<select name="connector" onChange="ICEcoder.findReplaceOptions()" style="width: 40px; margin-top: 4px">

lib/ice-coder.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,11 @@ var ICEcoder = {
16541654
},
16551655

16561656
// Find & replace text according to user selections
1657-
findReplace: function(findString,resultsOnly,buttonClick) {
1657+
findReplace: function(findString,resultsOnly,buttonClick,isCancel) {
1658+
if (isCancel){
1659+
top.ICEcoder.focus();
1660+
return;
1661+
}
16581662
var find, replace, results, cM, cMdiff, thisCM, content, cursor, avgBlockH, addPadding, rBlocks, blockColor, replaceQS, targetQS, filesQS;
16591663

16601664
// Determine our find & replace strings and results display

0 commit comments

Comments
 (0)