pull/7398/head
tugcekucukoglu 2025-03-10 09:17:40 +03:00
parent c22d9437d1
commit 8b31a6250e
1 changed files with 0 additions and 8 deletions

View File

@ -429,10 +429,6 @@ const Tooltip = BaseTooltip.extend('tooltip', {
let left = hostOffset.left + (getOuterWidth(el) - getOuterWidth(tooltipElement)) / 2;
let top = hostOffset.top - getOuterHeight(tooltipElement);
if (hostOffset.left < tooltipWidth / 2) {
left = hostOffset.left;
}
if (hostOffset.left + tooltipWidth > viewportWidth) {
// accounting for a scrollbar being present, getViewport() width includes scrollbars
left = Math.floor(hostOffset.left + elementWidth - tooltipWidth);
@ -461,10 +457,6 @@ const Tooltip = BaseTooltip.extend('tooltip', {
let left = hostOffset.left + (getOuterWidth(el) - getOuterWidth(tooltipElement)) / 2;
let top = hostOffset.top + getOuterHeight(el);
if (hostOffset.left < tooltipWidth / 2) {
left = hostOffset.left;
}
if (hostOffset.left + tooltipWidth > viewportWidth) {
// accounting for a scrollbar being present, getViewport() width includes scrollbars
left = Math.floor(hostOffset.left + elementWidth - tooltipWidth);