diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-09 16:23:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-09 16:23:44 +0200 |
commit | 6867681c7c0b4a5ec48511c013c3f3aa8684bdae (patch) | |
tree | ece9c081ceed9ee2b81ac9a6e44a8d72ae361b2d /app/javascript/mastodon/features/ui/components/embed_modal.js | |
parent | bdc8b4fd91aa90c624bca6cd6fe202876b4f654f (diff) |
Add script to make embedded iframes autosize (#4853)
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/embed_modal.js')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/embed_modal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/ui/components/embed_modal.js b/app/javascript/mastodon/features/ui/components/embed_modal.js index 992aed8a3..1afffb51b 100644 --- a/app/javascript/mastodon/features/ui/components/embed_modal.js +++ b/app/javascript/mastodon/features/ui/components/embed_modal.js @@ -33,7 +33,8 @@ export default class EmbedModal extends ImmutablePureComponent { iframeDocument.close(); iframeDocument.body.style.margin = 0; - this.iframe.height = iframeDocument.body.scrollHeight + 'px'; + this.iframe.width = iframeDocument.body.scrollWidth; + this.iframe.height = iframeDocument.body.scrollHeight; }); } @@ -71,7 +72,6 @@ export default class EmbedModal extends ImmutablePureComponent { <iframe className='embed-modal__iframe' - scrolling='no' frameBorder='0' ref={this.setIframeRef} title='preview' |