From 7e7e72e1f3c6a4b786b23ae671b4b0415b9ecdd5 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 23 Aug 2022 18:00:34 +0300 Subject: [PATCH] [SSE] Search: not replace when document is changed --- apps/spreadsheeteditor/main/app/controller/Search.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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);