mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 23:01:05 -05:00
Fix tooltips causing layout deformation
Fixes smogon/pokemon-showdown#6737
This commit is contained in:
@@ -410,6 +410,12 @@ class BattleTooltips {
|
||||
}
|
||||
}
|
||||
|
||||
let width = $(BattleTooltips.elem).outerWidth()!;
|
||||
if (x > document.documentElement.clientWidth - width - 2) {
|
||||
x = document.documentElement.clientWidth - width - 2;
|
||||
$wrapper.css('left', x);
|
||||
}
|
||||
|
||||
BattleTooltips.parentElem = hoveredElem || null;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user