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

Fix: SandBox component does not work outside WordPress context. #15415

Conversation

@jorgefilipecosta
Copy link
Member

commented May 3, 2019

Description

Fixes: #8565

The sandbox component resizing logic required the iframe to have a style setting the widget to 100%. In the block editor context, things worked as expected because the block styles include a style that sets iframes to 100%.

iframe {
width: 100%;
}

The component should not rely on this style being available.
This PR makes sure the component sets the style it needs.

How has this been tested?

I pasted the content available on this gist https://gist.github.com/jorgefilipecosta/94673924b3c426f2a0cb3c7fa179a984 on the playground playground/src/index.js.
I verified I could read the "Content" string.

@jorgefilipecosta jorgefilipecosta force-pushed the fix/sandbox-component-does-not-work-outside-wordpress-context branch from b07fb29 to 67de22f May 3, 2019

@mmtr

mmtr approved these changes May 4, 2019

Copy link
Contributor

left a comment

Awesome, it works as expected. Thanks!

Update packages/components/src/sandbox/style.scss
Co-Authored-By: jorgefilipecosta <jorge.costa@developer.pt>

@jorgefilipecosta jorgefilipecosta merged commit 1591471 into master May 4, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@jorgefilipecosta jorgefilipecosta deleted the fix/sandbox-component-does-not-work-outside-wordpress-context branch May 4, 2019

@youknowriad youknowriad added this to the 5.7 (Gutenberg) milestone May 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.