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

SandBox: Content not displayed #8565

Closed
mmtr opened this issue Aug 5, 2018 · 1 comment · Fixed by #15415
Closed

SandBox: Content not displayed #8565

mmtr opened this issue Aug 5, 2018 · 1 comment · Fixed by #15415
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@mmtr
Copy link
Contributor

mmtr commented Aug 5, 2018

Describe the bug
When rendering a SandBox component outside Gutenberg, its content is not displayed because the iframe has a width set to 0.

To Reproduce
Execute the code below in a new React project after installing @wordpress/components.

import React from 'react';
import ReactDOM from 'react-dom';
import { SandBox } from '@wordpress/components';

import '@wordpress/components/build-style/styles.css';

const MySandBox = () => (
	<SandBox
		html="<p>Content</p>"
		title="Sandbox"
		type="embed"
	/>
);

ReactDOM.render(
	<MySandBox />,
	document.getElementById( 'root' )
);

Expected behavior
The sandbox content is displayed.

Screenshots
screen shot 2018-08-05 at 23 42 56

Desktop:

  • OS: macOS High Sierra
  • Browser: Chrome
  • Version: 67

Additional context
Issue found while working on #8338 and Automattic/wp-calypso#26367

@gziolo gziolo added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Aug 6, 2018
@jorgefilipecosta
Copy link
Member

Thank you for reporting this bug @mmtr, I was able to reproduce this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants