diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx index 9b17fd19d..7123cd6ed 100644 --- a/apps/common/mobile/lib/view/Search.jsx +++ b/apps/common/mobile/lib/view/Search.jsx @@ -1,13 +1,9 @@ import React, { Component } from 'react'; -import { Popover, Popup, View, Page, List, ListItem, Navbar, NavRight, Link, f7 } from 'framework7-react'; -import { Toggle } from 'framework7-react'; -// import { f7 } from 'framework7-react/shared/f7.js'; -// import { Dom7 } from 'framework7'; +import { Popover, Popup, View, f7 } from 'framework7-react'; import { Device } from '../../../../common/mobile/utils/device'; import { observable, runInAction } from "mobx"; import { observer } from "mobx-react"; -import Searchbar from 'framework7/components/searchbar' const searchOptions = observable({ usereplace: false, @@ -106,13 +102,8 @@ class SearchView extends Component { $editor.on('pointerdown', this.onEditorTouchStart); $editor.on('pointerup', this.onEditorTouchEnd); - // if(!this.searchbar) { - // // f7.searchbar.get('.searchbar'); - // // this.searchbar = Searchbar.get('.searchbar'); - // } - if(!this.searchbar) { - this.searchbar = Searchbar.create({ + this.searchbar = f7.searchbar.create({ el: '.searchbar', customSearch: true, expandable: true, diff --git a/apps/documenteditor/mobile/src/app.js b/apps/documenteditor/mobile/src/app.js index 52d790bfd..d7621a7ff 100644 --- a/apps/documenteditor/mobile/src/app.js +++ b/apps/documenteditor/mobile/src/app.js @@ -3,9 +3,8 @@ import React, { Suspense } from 'react'; import { createRoot } from 'react-dom/client'; // Import Framework7 -// framework7/lite-bundle -import Framework7 from 'framework7/lite'; -import { Dom7 } from 'framework7/lite'; +import Framework7 from 'framework7/lite-bundle'; +import { Dom7 } from 'framework7/lite-bundle'; window.$$ = Dom7; // Import Framework7-React Plugin diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx index ec53012a2..412a7d774 100644 --- a/apps/documenteditor/mobile/src/controller/Search.jsx +++ b/apps/documenteditor/mobile/src/controller/Search.jsx @@ -4,7 +4,6 @@ import { SearchController, SearchView, SearchSettingsView } from '../../../../co import { withTranslation } from 'react-i18next'; import { Device } from '../../../../common/mobile/utils/device'; import { observer, inject } from "mobx-react"; -// import { f7 } from 'framework7-react/shared/f7.js'; class SearchSettings extends SearchSettingsView { constructor(props) { @@ -94,12 +93,12 @@ class DESearchView extends SearchView { const Search = withTranslation()(props => { const { t } = props; const _t = t('Settings', {returnObjects: true}); - // f7.searchbar.get('.searchbar')?.enabled && + useEffect(() => { - if(Device.phone) { + if(f7.searchbar.get('.searchbar')?.enabled && Device.phone) { const api = Common.EditorApi.get(); $$('.searchbar-input').focus(); - // api.asc_enableKeyEvents(false); + api.asc_enableKeyEvents(false); } }, []);