MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 71: Line 71:
                 var bodyTop = document.body.getBoundingClientRect().top;
                 var bodyTop = document.body.getBoundingClientRect().top;
                 var top = parseInt(window.getComputedStyle(e.target).top);   
                 var top = parseInt(window.getComputedStyle(e.target).top);   
                 console.log(top, bodyTop, top - bodyTop);
                 console.log('top', top);
                console.log('bodyTop', bodyTop);
                 e.target.style.left = left - bodyLeft + 'px';
                 e.target.style.left = left - bodyLeft + 'px';
                 // e.target.style.top = top + 'px';
                 // e.target.style.top = top + 'px';