The pop-up window is styled "position: absolute" and
positioned in the mouseOver handler by calculating the
X & Y coordinates from the mouse pointer position and
configured offsets relative to the window client area.
However, absolute positioning is a bit of a misnomer
because it's defined as being "positioned with respect
to its containing block", which is not necessarily the
client window area. The mouse pointer position from the
mouseOver event should be made relative to the overDiv
container before the position of the pop-up is
calculated (or make the calculated position of the
pop-up relative afterward.)
Here's my version of the repositionTo function that
fixes the problem:
// Move a layer
function repositionTo(obj, xL, yL) {
var theObj=(olNs4 ? obj : obj.style);
if (typeof obj.offsetParent != 'undefined')
while (obj = obj.offsetParent) {
xL -= obj.offsetLeft;
yL -= obj.offsetTop;
}
theObj.left = xL + (!olNs4 ? 'px' : 0);
theObj.top = yL + (!olNs4 ? 'px' : 0);
}
I'm not sure the 'if' is necessary, but I can't test
with NS4 to be sure that the 'while' test won't throw
an error if offsetParent isn't defined in the DOM.
While the patch above is good defensive coding, the
simple solution is for users to not define the overDiv
div and let overlib do it, but your documentation
encourages them to declare it in their HTML. Perhaps a
few words about exactly where it must be defined, i.e.
as an immediate child of the document root, are in
order if you choose not to make this change to the code.
Also see the discussion at
http://forge.joomla.org/sf/discussion/do/listPosts/projects.eventcal/discussion.technical_discussions.topc4602