[DE PE SSE mobile] Fix Bug 53256

This commit is contained in:
SergeyEzhin 2022-03-06 02:36:26 +04:00
parent 66f544bfe1
commit 77dbb42e72
6 changed files with 17 additions and 19 deletions

View file

@ -118,8 +118,6 @@ class SearchView extends Component {
on: { on: {
search: (bar, curval, prevval) => { search: (bar, curval, prevval) => {
}, },
enable: this.onSearchbarShow.bind(this, true),
disable: this.onSearchbarShow.bind(this, false)
} }
}); });
} }
@ -183,11 +181,11 @@ class SearchView extends Component {
} }
} }
onSearchbarShow(isshowed, bar) { // onSearchbarShow(isshowed, bar) {
if ( !isshowed ) { // if ( !isshowed ) {
this.$replace.val(''); // // this.$replace.val('');
} // }
} // }
onEditorTouchStart(e) { onEditorTouchStart(e) {
console.log('taouch start'); console.log('taouch start');
@ -260,7 +258,7 @@ class SearchView extends Component {
</div> </div>
<div className="searchbar-inner__center"> <div className="searchbar-inner__center">
<div className="searchbar-input-wrap"> <div className="searchbar-input-wrap">
<input className="searchbar-input" value={searchQuery} placeholder={_t.textSearch} type="search" maxLength="255" <input className="searchbar-input" value={searchQuery} placeholder={_t.textSearch} type="text" maxLength="255"
onChange={e => {this.changeSearchQuery(e.target.value)}} /> onChange={e => {this.changeSearchQuery(e.target.value)}} />
{isIos ? <i className="searchbar-icon" /> : null} {isIos ? <i className="searchbar-icon" /> : null}
<span className="input-clear-button" onClick={() => this.changeSearchQuery('')} /> <span className="input-clear-button" onClick={() => this.changeSearchQuery('')} />
@ -268,7 +266,7 @@ class SearchView extends Component {
{/* {usereplace || isReplaceAll ? */} {/* {usereplace || isReplaceAll ? */}
<div className="searchbar-input-wrap" style={usereplace || isReplaceAll ? null : hidden}> <div className="searchbar-input-wrap" style={usereplace || isReplaceAll ? null : hidden}>
{/* style={!usereplace ? hidden: null} */} {/* style={!usereplace ? hidden: null} */}
<input value={replaceQuery} placeholder={_t.textReplace} type="search" maxLength="255" id="idx-replace-val" <input value={replaceQuery} placeholder={_t.textReplace} type="text" maxLength="255" id="idx-replace-val"
onChange={e => {this.changeReplaceQuery(e.target.value)}} /> onChange={e => {this.changeReplaceQuery(e.target.value)}} />
{isIos ? <i className="searchbar-icon" /> : null} {isIos ? <i className="searchbar-icon" /> : null}
<span className="input-clear-button" onClick={() => this.changeReplaceQuery('')} /> <span className="input-clear-button" onClick={() => this.changeReplaceQuery('')} />

View file

@ -528,7 +528,7 @@
} }
} }
.searchbar input[type=search] { .searchbar input {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 100%; height: 100%;

View file

@ -489,7 +489,7 @@
} }
} }
.searchbar input[type=search] { .searchbar input {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
display: block; display: block;
@ -513,7 +513,7 @@
.encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" fill="@{white}" height="24" viewBox="0 0 24 24" width="24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'); .encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" fill="@{white}" height="24" viewBox="0 0 24 24" width="24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
} }
.searchbar input[type=search]::placeholder { .searchbar input::placeholder {
color: @fill-white; color: @fill-white;
} }

View file

@ -80,9 +80,9 @@ class DESearchView extends SearchView {
} }
onSearchbarShow(isshowed, bar) { onSearchbarShow(isshowed, bar) {
super.onSearchbarShow(isshowed, bar); // super.onSearchbarShow(isshowed, bar);
const api = Common.EditorApi.get(); const api = Common.EditorApi.get();
if ( isshowed && this.state.searchQuery.length ) { if ( isshowed && this.state.searchQuery.length ) {
const checkboxMarkResults = f7.toggle.get('.toggle-mark-results'); const checkboxMarkResults = f7.toggle.get('.toggle-mark-results');
api.asc_selectSearchingResults(checkboxMarkResults.checked); api.asc_selectSearchingResults(checkboxMarkResults.checked);

View file

@ -65,9 +65,9 @@ class PESearchView extends SearchView {
return {...params, ...searchOptions}; return {...params, ...searchOptions};
} }
onSearchbarShow(isshowed, bar) { // onSearchbarShow(isshowed, bar) {
super.onSearchbarShow(isshowed, bar); // super.onSearchbarShow(isshowed, bar);
} // }
} }
const Search = withTranslation()(props => { const Search = withTranslation()(props => {

View file

@ -123,9 +123,9 @@ class SESearchView extends SearchView {
} }
onSearchbarShow(isshowed, bar) { onSearchbarShow(isshowed, bar) {
super.onSearchbarShow(isshowed, bar); // super.onSearchbarShow(isshowed, bar);
const api = Common.EditorApi.get(); const api = Common.EditorApi.get();
if ( isshowed && this.state.searchQuery.length ) { if ( isshowed && this.state.searchQuery.length ) {
const checkboxMarkResults = f7.toggle.get('.toggle-mark-results'); const checkboxMarkResults = f7.toggle.get('.toggle-mark-results');
api.asc_selectSearchingResults(checkboxMarkResults.checked); api.asc_selectSearchingResults(checkboxMarkResults.checked);