[dokuwiki] Footnotes and mouseover

I've noticed that in Internet Explorer (Opera and Firefox are not a problem) 
the mouseover popups for footnotes are at the wrong position whenever the 
footnote is inside a container. For instance, copy this text into your 
playground:

| Some text with a footnote, inside a table.((Note that the mouseover pops 
up at the wrong location in Internet Explorer.)) |

It's also an especially bad problem in some templates which "contain" 
everything--all footnotes are wrong. (I'm using a modified "sidebar" 
template.)

So ... on my wiki I modified /lib/scripts/script.js beginning at about line 
372 so that it adds a condition using clientX:

    // position the div and make it visible
    var x; var y;
    if(e.pageX){        // Mozilla
        x = e.pageX;
        y = e.pageY;
    }else if (e.clientX || e.clientY){
        x = e.clientX + document.body.parentElement.scrollLeft;
        y = e.clientY + document.body.parentElement.scrollTop;
    }else{
        x = e.offsetX;
        y = e.offsetY;
    }

BUT ... I'm not particularly "up" with current browsers and javascript. Will 
this work as a general solution, or is there a better way?

Todd Augsburger
todd@xxxxxxxxxxxxxxxx
Roller Organs
www.rollerorgans.com

 

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: