[DE PE SSE] Fix bug 58193
This commit is contained in:
parent
65e7054b54
commit
d937172a52
|
@ -368,7 +368,8 @@ define([
|
|||
viewport.searchBar.hide();
|
||||
}
|
||||
|
||||
var text = typeof findText === 'string' ? findText : (this.api.asc_GetSelectedText() || this._state.searchText);
|
||||
var selectedText = this.api.asc_GetSelectedText(),
|
||||
text = typeof findText === 'string' ? findText : (selectedText && selectedText.trim() || this._state.searchText);
|
||||
if (this.resultItems && this.resultItems.length > 0 &&
|
||||
(!this._state.matchCase && text && text.toLowerCase() === this.view.inputText.getValue().toLowerCase() ||
|
||||
this._state.matchCase && text === this.view.inputText.getValue())) { // show old results
|
||||
|
|
|
@ -337,7 +337,8 @@ define([
|
|||
viewport.searchBar.hide();
|
||||
}
|
||||
|
||||
var text = typeof findText === 'string' ? findText : (this.api.asc_GetSelectedText() || this._state.searchText);
|
||||
var selectedText = this.api.asc_GetSelectedText(),
|
||||
text = typeof findText === 'string' ? findText : (selectedText && selectedText.trim() || this._state.searchText);
|
||||
if (text) {
|
||||
this.view.setFindText(text);
|
||||
} else if (text !== undefined) { // panel was opened from empty searchbar, clear to start new search
|
||||
|
|
|
@ -481,7 +481,8 @@ define([
|
|||
viewport.searchBar.hide();
|
||||
}
|
||||
|
||||
var text = typeof findText === 'string' ? findText : (this.api.asc_GetSelectedText() || this._state.searchText);
|
||||
var selectedText = this.api.asc_GetSelectedText(),
|
||||
text = typeof findText === 'string' ? findText : (selectedText && selectedText.trim() || this._state.searchText);
|
||||
if (this.resultItems && this.resultItems.length > 0 &&
|
||||
(!text && !this.view.inputText.getValue() ||
|
||||
!this._state.matchCase && text && text.toLowerCase() === this.view.inputText.getValue().toLowerCase() ||
|
||||
|
|
Loading…
Reference in a new issue