Skip to content

Commit 93c04f2

Browse files
committed
fix: position tooltip as fixed to break out of other widgets scroll
1 parent 4914fa6 commit 93c04f2

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

packages/pluggableWidgets/tooltip-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed an issue where the tooltip would cause scrollbars to appear in some cases.
12+
913
## [1.4.2] - 2024-10-31
1014

1115
### Fixed

packages/pluggableWidgets/tooltip-web/src/components/__tests__/__snapshots__/Tooltip.spec.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exports[`Tooltip render DOM structure 1`] = `
2121
data-floating-ui-focusable=""
2222
id=":r0:"
2323
role="tooltip"
24-
style="position: absolute; left: 0px; top: 0px; transform: translate(0px, 0px);"
24+
style="position: fixed; left: 0px; top: 0px; transform: translate(0px, 0px);"
2525
tabindex="-1"
2626
>
2727
Tooltip text

packages/pluggableWidgets/tooltip-web/src/utils/useFloatingUI.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type FloatingPropsReturn = Partial<UseFloatingReturn<ReferenceElement>> &
4747
export function useFloatingUI(props: FloatingProps): FloatingPropsReturn {
4848
const { position, showTooltip, setShowTooltip, arrowElement, openOn } = props;
4949
const { refs, floatingStyles, context, middlewareData, placement } = useFloating({
50+
strategy: "fixed",
5051
placement: position,
5152
open: showTooltip,
5253
onOpenChange: setShowTooltip,

0 commit comments

Comments
 (0)