From cce1e9ac37efd150152ca6191e6e367bb01d6dc6 Mon Sep 17 00:00:00 2001 From: leesei Date: Wed, 1 Feb 2017 12:06:14 +0800 Subject: [PATCH] fix: overlay size calculation fix #1116 --- src/overlay.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/overlay.js b/src/overlay.js index 7ad7a646..9d9edd88 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -248,6 +248,8 @@ element.prevNextSibling = element.nextSibling; container.appendChild(element); + // have to set position before calculating size, fix #1116 + this.style.position = "absolute"; // this.size is used by overlays which don't get scaled in at // least one direction when this.checkResize is set to false. this.size = $.getElementSize(element); @@ -286,7 +288,6 @@ style[transformProp] = ""; } } - style.position = "absolute"; if (style.display !== 'none') { style.display = 'block';