diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 2a9db03728..69e5de2a14 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react'; import {inject} from "mobx-react"; +import { f7 } from "framework7-react"; import { withTranslation } from 'react-i18next'; import CollaborationController from '../../../../common/mobile/lib/controller/Collaboration.jsx'; import { onAdvancedOptions } from './settings/Download.jsx'; @@ -87,6 +88,7 @@ class MainController extends Component { } this.api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); + this.api.asc_registerCallback('asc_onDocumentContentReady', onDocumentContentReady); // this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); // this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); this.api.asc_setDocInfo(docInfo); @@ -129,6 +131,11 @@ class MainController extends Component { this.api.Resize(); }; + const onDocumentContentReady = () => { + Common.Gateway.documentReady(); + f7.emit('resize'); + }; + const _process_array = (array, fn) => { let results = []; return array.reduce(function(p, item) { diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx index c5ba5777e2..3aa5693cd9 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -1,6 +1,7 @@ import React, { Component } from 'react' import { inject } from "mobx-react"; +import { f7 } from 'framework7-react'; import { withTranslation } from 'react-i18next'; import CollaborationController from '../../../../common/mobile/lib/controller/Collaboration.jsx' @@ -227,6 +228,7 @@ class MainController extends Component { me.api.asc_showWorksheet(me.api.asc_getActiveWorksheetIndex()); Common.Gateway.documentReady(); + f7.emit('resize'); } _onOpenDocumentProgress(progress) {