Skip to content

Commit

Permalink
Merge pull request #88 from softeerbootcamp4th/fix/#87-tooltip-position
Browse files Browse the repository at this point in the history
[Fix] 툴팁 위치 오류 수정
  • Loading branch information
jhj2713 authored Aug 5, 2024
2 parents 56a2d8b + 414722c commit d5b1bf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Tooltip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export default function Tooltip({
const leftPosition = getLeftPosition(tooltipPosition, triggerRect.width, tooltipRect.width);

setPosition({
top: window.scrollY - tooltipRect.height - TOOLTIP_GAP,
left: window.scrollX + leftPosition,
top: triggerRef.current.scrollTop - tooltipRect.height - TOOLTIP_GAP,
left: triggerRef.current.scrollLeft + leftPosition,
});
}, [isVisible, tooltipPosition]);

Expand Down

0 comments on commit d5b1bf8

Please sign in to comment.