mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Deselect value if cancelling focus
Amazingly, there is no deselect() as an opposite to select(). The nearest alternative seems to be setSelectionRange(0,0), but support is patchy. Most reliable solution is to set the value to itself.
This commit is contained in:
@@ -1661,6 +1661,8 @@ var ICEcoder = {
|
||||
// Find & replace text according to user selections
|
||||
findReplace: function(findString,resultsOnly,buttonClick,isCancel) {
|
||||
if (isCancel){
|
||||
// Deselect by setting value to itself, then focus on editor
|
||||
top.get('find').value = top.get('find').value;
|
||||
top.ICEcoder.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user