- assigned_to: nobody --> fredck
Hello.
When you put FCK 2.3.1 inside an absolute DIV, the
popups and context menus appear out of position.
Replacing the function 'FCKTools.GetElementPosition' in
FCKTools.js for the one bellow fixes the problem.
NOTE: I've just tested this for FireFox 1.5.0.6 for
Windows. IE doesn't use this function (it has a
specific function for it).
FCKTools.GetElementPosition = function( el,
relativeWindow ) {
var x = 0, y = 0, p, s, wnd = relativeWindow ||
FCKTools.GetElementWindow (el);
if (el) {
for (;;) {
s = wnd.getComputedStyle (el, "").position;
if (s && s != "static" &&
el.style.zIndex !=
FCKConfig.FloatingPanelsZIndex) break; //
'FCKConfig.FloatingPanelsZIndex' -- Submenus are under
a
positioned IFRAME.
x += el.offsetLeft - el.scrollLeft;
y += el.offsetTop - el.scrollTop;
if (p = el.offsetParent)
el = p
else {
wnd = FCKTools.GetElementWindow (el);
if (!wnd || !(el = wnd.frameElement)) break;
wnd = FCKTools.GetElementWindow (el);
}
}
}
return { X:x, Y:y };
}
Filipe Martins
http://www.i-senso.com
Logged In: YES
user_id=572424
Hi,
This patch, or a similar implementation, has been included in
FCKeditor and has been committed in the SVN. It will be
available in the next release.
For more information about the FCKeditor SVN system, please use
the following URL:
http://wiki.fckeditor.net/SVN
Best regards,
FredCK
http://www.fckeditor.net
"Support Open Source Software... What about a donation today?"
PS.: This is a canned response.
Log in to post a comment.