diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx index 586c97feaa..43d23b84d4 100644 --- a/apps/common/mobile/lib/view/Search.jsx +++ b/apps/common/mobile/lib/view/Search.jsx @@ -261,7 +261,7 @@ class SearchView extends Component {
- {this.changeSearchQuery(e.target.value)}} /> {isIos ? : null} this.changeSearchQuery('')} /> diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index db73167b5d..416dd10558 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -23,6 +23,7 @@ const AddCommentPopup = inject("storeComments")(observer(props => { const _t = t('Common.Collaboration', {returnObjects: true}); useEffect(() => { f7.popup.open('.add-comment-popup'); + if(!Device.android) f7.input.focus('.input-comment'); }); const userInfo = props.userInfo; const [stateText, setText] = useState(''); @@ -59,7 +60,7 @@ const AddCommentPopup = inject("storeComments")(observer(props => {
{userInfo.name}
- {setText(event.target.value);}}> + {setText(event.target.value);}}>
@@ -94,12 +95,13 @@ const AddCommentDialog = inject("storeComments")(observer(props => {
${userInfo.name}
- +
`, on: { opened: () => { const cancel = document.getElementById('comment-cancel'); + if(!Device.android) $$('#comment-text').focus(); cancel.addEventListener('click', () => { f7.dialog.close(); props.closeAddComment(); diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx index 320d5bb85d..c5f0627264 100644 --- a/apps/documenteditor/mobile/src/controller/Search.jsx +++ b/apps/documenteditor/mobile/src/controller/Search.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { List, ListItem, Toggle, Page, Navbar, NavRight, Link } from 'framework7-react'; import { SearchController, SearchView, SearchSettingsView } from '../../../../common/mobile/lib/controller/Search'; import { f7 } from 'framework7-react'; @@ -94,6 +94,14 @@ const Search = withTranslation()(props => { const { t } = props; const _t = t('Settings', {returnObjects: true}); + useEffect(() => { + if (f7.searchbar.get('.searchbar')?.enabled && Device.phone) { + const api = Common.EditorApi.get(); + $$('.searchbar-input').focus(); + api.asc_enableKeyEvents(false); + } + }); + const onSearchQuery = params => { const api = Common.EditorApi.get(); diff --git a/apps/presentationeditor/mobile/src/controller/Search.jsx b/apps/presentationeditor/mobile/src/controller/Search.jsx index 4f801755ee..23fd51cb16 100644 --- a/apps/presentationeditor/mobile/src/controller/Search.jsx +++ b/apps/presentationeditor/mobile/src/controller/Search.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useEffect} from 'react'; import { List, ListItem, Toggle, Page, Navbar, NavRight, Link } from 'framework7-react'; import { SearchController, SearchView, SearchSettingsView } from '../../../../common/mobile/lib/controller/Search'; import { f7 } from 'framework7-react'; @@ -74,6 +74,14 @@ const Search = withTranslation()(props => { const { t } = props; const _t = t('View.Settings', {returnObjects: true}); + useEffect(() => { + if (f7.searchbar.get('.searchbar')?.enabled && Device.phone) { + const api = Common.EditorApi.get(); + $$('.searchbar-input').focus(); + api.asc_enableKeyEvents(false); + } + }); + const onSearchQuery = params => { const api = Common.EditorApi.get(); diff --git a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx index 5674056a6a..7cbf2c6afb 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx @@ -137,6 +137,14 @@ const Search = withTranslation()(props => { const { t } = props; const _t = t('View.Settings', {returnObjects: true}); + useEffect(() => { + if (f7.searchbar.get('.searchbar')?.enabled && Device.phone) { + const api = Common.EditorApi.get(); + $$('.searchbar-input').focus(); + api.asc_enableKeyEvents(false); + } + }); + const onSearchQuery = params => { const api = Common.EditorApi.get();