Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iframe not resizing #5

Open
Bryze opened this issue Dec 21, 2017 · 4 comments
Open

Iframe not resizing #5

Bryze opened this issue Dec 21, 2017 · 4 comments

Comments

@Bryze
Copy link

Bryze commented Dec 21, 2017

This is the current snippet, I pass url as props to this class which uses reactiframeresizer to construct the new iframe.
import React from 'react';
import ReactIframeResizer from 'react-iframe-resizer-super';

export default class WidgetFrame extends React.Component {

constructor(props) {
    super(props);
}

render() {
    return (
    <ReactIframeResizer src={this.props.url} iframeResizerEnable ={true}  />
    )
}

}

However, the iframe that is being rendered doesn't resize. My guess is, the content loads after the iframeresizer frame has been constructed which causes it to render at a fixed height.
If this is the reason, what is the remedy for it? If no, suggestions are welcome as well.

Also, I'm being bombarded with the following errors and warnings. Though it doesn't hurt the functionality, but it surely spoils the presentation aspect of the component.
image

I'll be glad if someone could post a solution for this as well :)

@Leocardoso94
Copy link

I have the same problem

@pietervanneste
Copy link

Same problem here...

@marzelin
Copy link

For the resizer to work iframeResizer.contentWindow.min.js needs to be injected into the page inside iframe. If both pages share the same origin this component is able to inject the script but when the origins are different you have to make sure that the hosted site will have the script injected somehow.

@VOsipenkov
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants