[DE PE SSE mobile] Fix Bug 59989
This commit is contained in:
parent
51f0bfa089
commit
e749085682
|
@ -1,4 +1,4 @@
|
||||||
import React from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { Navbar, Page } from 'framework7-react';
|
import { Navbar, Page } from 'framework7-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
|
@ -7,15 +7,20 @@ const ViewSharingSettings = props => {
|
||||||
const sharingSettingsUrl = props.sharingSettingsUrl;
|
const sharingSettingsUrl = props.sharingSettingsUrl;
|
||||||
const _t = t('Common.Collaboration', {returnObjects: true});
|
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;
|
iFrame.height = iFrame.contentWindow.document.body.scrollHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
resizeHeightIframe('#sharing-placeholder iframe');
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
<Navbar title={t('Common.Collaboration.textSharingSettings')} backLink={_t.textBack} />
|
<Navbar title={t('Common.Collaboration.textSharingSettings')} backLink={_t.textBack} />
|
||||||
<div id="sharing-placeholder" className="sharing-placeholder">
|
<div id="sharing-placeholder" className="sharing-placeholder">
|
||||||
<iframe width="100%" frameBorder={0} scrolling="0" align="top" src={sharingSettingsUrl} onLoad={resizeHeightIframe(this)}></iframe>
|
<iframe width="100%" frameBorder={0} scrolling="0" align="top" src={sharingSettingsUrl}></iframe>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue