Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Popup Menu Does not Appear to Take into Account Margins
posted

Hi,

We're using the 2008.1 release and have run into a problem where the positioning of the Popup Menu, when attached to the a Tree View, is incorrect. With a bit of analysis we can see that in Internet Explorer, the issue is due to the fact that the position is not taking into account the top and left margins of the page - we have a fixed margin of 10px at the top of the page and are using 'Margin: 0px auto 0px auto' to achieve centering. There are also problems in Firefox, but at the moment we have not understood the cause, however the positioning is more significantly incorrect and every time the popup menu is displayed by right clicking on the tree node it's width increases by a number of pixels.

Has anyone else experienced this issue? Is there something that we should be doing, but have missed?

For reference, we use the javascript below in other solutions to position popup help panels, etc for a given element successfully in both Firefox and Internet Explorer.

function FindElementsPosition(element) {

  var curLeft = 0;
  var curTop = 0;

 if (element.offsetParent) {

  curLeft = element.offsetLeft
  curTop = element.offsetTop

  while (element = element.offsetParent) {
   curLeft += element.offsetLeft
   curTop += element.offsetTop
  }

 }

 return [curLeft,curTop];

}

 

Thanks in advance....

Cheers, James.

Parents Reply Children
No Data