MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 67: | Line 67: | ||
if (e.target.classList && e.target.classList.contains('rt-tooltip')) { | if (e.target.classList && e.target.classList.contains('rt-tooltip')) { | ||
requestAnimationFrame(function () { | requestAnimationFrame(function () { | ||
var bodyLeft = document.body.getBoundingClientRect().left; | var bodyLeft = document.body.getBoundingClientRect().left; | ||
var left = parseInt(window.getComputedStyle(e.target).left); | var left = parseInt(window.getComputedStyle(e.target).left); | ||
e.target.style.left = left - bodyLeft + 'px'; | e.target.style.left = left - bodyLeft + 'px'; | ||
}); | }); | ||