MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 67: Line 67:
     function (e) {
     function (e) {
         if (e.target.classList && e.target.classList.contains('rt-tooltip')) {
         if (e.target.classList && e.target.classList.contains('rt-tooltip')) {
        e.target.style.animation = 'none';
             requestAnimationFrame(function () {
             requestAnimationFrame(function () {
                 var bodyTop = document.body.getBoundingClientRect().top;
                 var bodyTop = document.body.getBoundingClientRect().top;
Line 77: Line 76:
                 console.log(top , bodyTop , window.scrollY);
                 console.log(top , bodyTop , window.scrollY);
                 e.target.style.left = left - bodyLeft + 'px';
                 e.target.style.left = left - bodyLeft + 'px';
                 e.target.style.top = top - bodyTop - window.scrollY + 'px';
                 // e.target.style.top = top - bodyTop - window.scrollY + 'px';
                 console.log(e.target);
                 console.log(e.target);