MediaWiki:Common.js: Difference between revisions

6 bytes removed ,  21:50, 27 July 2022
Use a fixed timer instead because waiting for the next animation frame does not work
(Only remove the css rule after the reflow ahppened)
(Use a fixed timer instead because waiting for the next animation frame does not work)
 
Line 5: Line 5:
if($(".tooltip").length) {
if($(".tooltip").length) {
   document.styleSheets[0].insertRule(".tooltiptext {top:0}");
   document.styleSheets[0].insertRule(".tooltiptext {top:0}");
   window.requestAnimationFrame(function() {
   window.setTimeout(function() {
     document.styleSheets[0].deleteRule(0);
     document.styleSheets[0].deleteRule(0);
   })
   }, 500)
}
}
System Operators, Wiki Team
278

edits