diff --git a/apps/common/mobile/lib/view/SharingSettings.jsx b/apps/common/mobile/lib/view/SharingSettings.jsx index b8a36fc45..6240961f5 100644 --- a/apps/common/mobile/lib/view/SharingSettings.jsx +++ b/apps/common/mobile/lib/view/SharingSettings.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { Navbar, Page } from 'framework7-react'; import { useTranslation } from 'react-i18next'; @@ -7,15 +7,20 @@ const ViewSharingSettings = props => { const sharingSettingsUrl = props.sharingSettingsUrl; const _t = t('Common.Collaboration', {returnObjects: true}); - function resizeHeightIframe(iFrame) { + function resizeHeightIframe(selector) { + const iFrame = document.querySelector(selector); iFrame.height = iFrame.contentWindow.document.body.scrollHeight; }; + useEffect(() => { + resizeHeightIframe('#sharing-placeholder iframe'); + }, []); + return (
- +
)