diff --git a/apps/spreadsheeteditor/main/app/controller/Search.js b/apps/spreadsheeteditor/main/app/controller/Search.js index bd6410931..9435e4cd5 100644 --- a/apps/spreadsheeteditor/main/app/controller/Search.js +++ b/apps/spreadsheeteditor/main/app/controller/Search.js @@ -271,6 +271,10 @@ define([ }, onQueryReplace: function(textSearch, textReplace) { + if (this._state.isContentChanged) { + this.onQuerySearch(); + return; + } this.api.isReplaceAll = false; var options = new Asc.asc_CFindOptions(); options.asc_setFindWhat(textSearch); @@ -289,6 +293,10 @@ define([ }, onQueryReplaceAll: function(textSearch, textReplace) { + if (this._state.isContentChanged) { + this.onQuerySearch(); + return; + } this.api.isReplaceAll = true; var options = new Asc.asc_CFindOptions(); options.asc_setFindWhat(textSearch);