diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx index 3d9590dd8..43d23b84d 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('')} /> @@ -302,5 +302,6 @@ class SearchView extends Component { } const SearchViewWithObserver = observer(SearchView); +const SearchSettingsViewWithObserver = observer(SearchSettingsView); -export {SearchViewWithObserver as SearchView, SearchSettingsView}; +export {SearchViewWithObserver as SearchView, SearchSettingsViewWithObserver as SearchSettingsView}; diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index db73167b5..416dd1055 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/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 34b2764c0..864c8798e 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -231,47 +231,6 @@ } } -// Theme - -.slide-theme { - &__list { - margin: auto; - ul { - display: flex; - justify-content: space-between; - flex-wrap: wrap; - padding-left: 18px; - padding-right: 18px; - padding-bottom: 14px; - } - } - .item-inner:after { - display: none; - } - .item-theme { - position: relative; - margin: 0; - box-shadow: 0 0 0 1px rgba(0,0,0,.15); - width: 88px; - height: 40px; - margin-top: 14px; - background-image: url(../img/themes/themes.png); - display: block; - background-repeat: no-repeat; - background-size: cover; - } - .item-theme.active:before { - content: ''; - position: absolute; - width: 22px; - height: 22px; - right: -5px; - bottom: -5px; - z-index: 1; - .encoded-svg-background(''); - } -} - // Transition .slide-transition { diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx index a5a689e31..c5f062726 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'; @@ -25,6 +25,8 @@ class SearchSettings extends SearchSettingsView { const _t = t("Settings", {returnObjects: true}); const storeAppOptions = this.props.storeAppOptions; const isEdit = storeAppOptions.isEdit; + const storeReview = this.props.storeReview; + const displayMode = storeReview.displayMode; const markup = ( @@ -37,7 +39,7 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> - {isEdit ? [ + {isEdit && displayMode === 'markup' ? [ this.onFindReplaceClick('replace')} />, { 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(); @@ -132,6 +142,6 @@ const Search = withTranslation()(props => { return }); -const SearchSettingsWithTranslation = inject("storeAppOptions")(observer(withTranslation()(SearchSettings))); +const SearchSettingsWithTranslation = inject("storeAppOptions", "storeReview")(observer(withTranslation()(SearchSettings))); export {Search, SearchSettingsWithTranslation as SearchSettings} diff --git a/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx b/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx index 6a8ee5c28..6f641b534 100644 --- a/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx @@ -69,6 +69,7 @@ const PageDocumentMargins = props => { } if(errorMsg) { + f7.popover.close('#settings-popover'); f7.dialog.alert(errorMsg, _t.notcriticalErrorTitle); return; } diff --git a/apps/presentationeditor/mobile/src/controller/Search.jsx b/apps/presentationeditor/mobile/src/controller/Search.jsx index 4f801755e..23fd51cb1 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/presentationeditor/mobile/src/less/app.less b/apps/presentationeditor/mobile/src/less/app.less index 289e67d0e..edf9e2033 100644 --- a/apps/presentationeditor/mobile/src/less/app.less +++ b/apps/presentationeditor/mobile/src/less/app.less @@ -99,3 +99,44 @@ .swiper-pagination-bullet-active{ background: @black; } + +// Theme + +.slide-theme { + &__list { + margin: auto; + ul { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + padding-left: 18px; + padding-right: 18px; + padding-bottom: 14px; + } + } + .item-inner:after { + display: none; + } + .item-theme { + position: relative; + margin: 0; + box-shadow: 0 0 0 1px rgba(0,0,0,.15); + width: 88px; + height: 40px; + margin-top: 14px; + background-image: url('../../../../../../web-apps/apps/presentationeditor/mobile/dist/images/themes.png'); + display: block; + background-repeat: no-repeat; + background-size: cover; + } + .item-theme.active:before { + content: ''; + position: absolute; + width: 22px; + height: 22px; + right: -5px; + bottom: -5px; + z-index: 1; + .encoded-svg-background(''); + } +} diff --git a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx index 5674056a6..7cbf2c6af 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();