Merge pull request #538 from coralproject/ios-safari-full-width

Safari IOS ignores width=100% in iframes
This commit is contained in:
David Erwin
2017-04-26 09:44:01 -04:00
committed by GitHub
+4
View File
@@ -57,6 +57,10 @@ function configurePymParent(pymParent) {
window.document.body.appendChild(snackbar);
// Workaround: IOS Safari ignores `width` but respects `min-width` value.
pymParent.el.firstChild.style.width = '1px';
pymParent.el.firstChild.style.minWidth = '100%';
// Resize parent iframe height when child height changes
pymParent.onMessage('height', function(height) {
if (height !== cachedHeight) {