toolbar dropdowns wronly positioned
Posted: Thu May 29, 2014 6:49 am
The toolbar dropdowns are wronly positioned when the report viewer (or one of its parent) is contained in a relative positioned container.
For example:
The problem is in this JS code of the MenuShowEvent function. If the position is relative in a parent, its topoffset gets added to the top variable which is used to position the dropdown
...
if (p.style.position != "absolute" && p.style.position != "fixed" && (p.currentStyle == null || (p.currentStyle.position != "absolute" && p.currentStyle.position != "fixed")))
{
left += p.offsetLeft;
top += p.offsetTop;
}
For example:
Code: Select all
<br><br><br><br><br><br><br><br>
<div style="position:relative">
<cc1:StiWebViewer />
</div>
...
if (p.style.position != "absolute" && p.style.position != "fixed" && (p.currentStyle == null || (p.currentStyle.position != "absolute" && p.currentStyle.position != "fixed")))
{
left += p.offsetLeft;
top += p.offsetTop;
}