fix: overlay size calculation

fix #1116
This commit is contained in:
leesei 2017-02-01 12:06:14 +08:00
parent 8df10f2177
commit cce1e9ac37

View File

@ -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';