Safari IOS ignores width=100% in iframes

This commit is contained in:
Chi Vinh Le
2017-04-26 18:52:30 +07:00
parent 2c2c2dc604
commit 9ff2ccf1ed
+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) {