diff --git a/apps/documenteditor/embed/js/SearchBar.js b/apps/documenteditor/embed/js/SearchBar.js index 6b69b0eff..06d5a6f61 100644 --- a/apps/documenteditor/embed/js/SearchBar.js +++ b/apps/documenteditor/embed/js/SearchBar.js @@ -109,7 +109,7 @@ }; var onInputSearchChange = function (text) { - if (_state.searchText !== text) { + if ((text && _state.searchText !== text) || (!text && _state.newSearchText)) { _state.newSearchText = text; _lastInputChange = (new Date()); if (_searchTimer === undefined) { diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js index e0bf2cd81..1de24a685 100644 --- a/apps/documenteditor/main/app/controller/Search.js +++ b/apps/documenteditor/main/app/controller/Search.js @@ -145,7 +145,7 @@ define([ onInputSearchChange: function (text) { var me = this; - if (this._state.searchText !== text) { + if ((text && this._state.searchText !== text) || (!text && this._state.newSearchText)) { this._state.newSearchText = text; this._lastInputChange = (new Date()); if (this.searchTimer === undefined) { diff --git a/apps/presentationeditor/embed/js/SearchBar.js b/apps/presentationeditor/embed/js/SearchBar.js index 9c76aa222..d182da950 100644 --- a/apps/presentationeditor/embed/js/SearchBar.js +++ b/apps/presentationeditor/embed/js/SearchBar.js @@ -107,7 +107,7 @@ }; var onInputSearchChange = function (text) { - if (_state.searchText !== text) { + if ((text && _state.searchText !== text) || (!text && _state.newSearchText)) { _state.newSearchText = text; _lastInputChange = (new Date()); if (_searchTimer === undefined) { diff --git a/apps/presentationeditor/main/app/controller/Search.js b/apps/presentationeditor/main/app/controller/Search.js index 248934c6c..b85d0e420 100644 --- a/apps/presentationeditor/main/app/controller/Search.js +++ b/apps/presentationeditor/main/app/controller/Search.js @@ -142,7 +142,7 @@ define([ onInputSearchChange: function (text) { var me = this; - if (this._state.searchText !== text) { + if ((text && this._state.searchText !== text) || (!text && this._state.newSearchText)) { this._state.newSearchText = text; this._lastInputChange = (new Date()); if (this.searchTimer === undefined) {