From 93d26f615986d0949b57a8ff2b429e3142d25a2a Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 21 Mar 2015 15:11:42 -0500 Subject: [PATCH] Safari: popup resizing fix for #1066 --- platform/safari/vapi-popup.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/safari/vapi-popup.js b/platform/safari/vapi-popup.js index 0ff5b73bd..57395c069 100644 --- a/platform/safari/vapi-popup.js +++ b/platform/safari/vapi-popup.js @@ -37,16 +37,16 @@ var onLoaded = function() { powerAndStatsPane = panes.children[0], dfPane = panes.children[1]; - body.style.setProperty("width", "100%"); - panes.style.setProperty("width", "100%"); - dfPane.style.setProperty("display", "inline-block", "important"); - var updateSize = function() { var dfEnabled = panes.classList.contains(DF_ENABLED_CLASS); popover.width = powerAndStatsPane.clientWidth + (dfEnabled ? dfPane.clientWidth : 0); popover.height = body.clientHeight; }; - updateSize(); + + body.style.setProperty("width", "100%"); + panes.style.setProperty("width", "100%"); + dfPane.style.setProperty("display", "inline-block", "important"); + setTimeout(updateSize, 0); }; window.addEventListener("load", onLoaded); })();