[Typo3-dev] Update on the context menu problem

"Kasper Skårhøj" kasper at typo3.com
Wed Dec 17 11:05:25 CET 2003


Hi folks.

I have figured out about my context menu problem that in XHTML compliance mode the "document.body.scrollTop" attribute is not there anymore - for MSIE at least. It has been moved into "document.documentElement.scrollTop" apparently. Then I hoped this was the case for all standard compliance browsers but found that Mozilla didn't do that. Sigh. So now I have a fix for the problem which looks like this:

GLV_y = GLV_yRel + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);


The old line was:

GLV_y= (bw.ns4||bw.ns5)?event.pageY:(bw.ie4||bw.op)?event.clientY:(event.clientY-2)+document.body.scrollTop;



Generally, I want the backend to be standard compliant and now it works on MSIE6, Opera7, Mozilla on windows XP and Moz/Konq on linux. Eventually all the browserchecks in the above line ("(bw.ns4||bw.ns5)?event....") might be removed if they have no significance.

Anyways, it works for now, let me know if you have more insights for cleaner code or otherwise objections. Or find bugs in Mac!
- kasper

------------------ 0 --------------------
New address! (Nov. 2003)

Kasper Skaarhoj
Tryggevaeldevej 8
DK-2720 Vanlose
Denmark






More information about the TYPO3-dev mailing list