You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In React DeckGL, the .deck-widgets-root element is an unpositioned sibling after .deck-events-root. It falls below the canvas in normal document flow. TooltipWidget.onHover() subtracts that root's offset through WidgetManager.getCanvasBounds(), but the tooltip's absolutely positioned ancestors use the outer DeckGL wrapper as their containing block. The resulting tooltip can be placed above the map.
Reproduced with deck.gl 9.4.0 and current master (7fa7dc7) in headless Chromium on Linux. No widget stylesheet is imported.
Expected behavior
The built-in getTooltip tooltip should appear at the picked canvas position, including after resizing the React component.
Steps to reproduce
Render the following React component, then hover over the red point in the center:
The tooltip text exists in the DOM, but its vertical position is above the map. The widget root has zero height and starts below the event root.
A browser regression test on current master with a 200×100 canvas at page offset (40, 60), hovering at canvas coordinate (50, 25), gets tooltip top -15px instead of 85px. Anchoring the React-owned widget root with position: absolute; inset: 0; pointer-events: none restores the expected coordinates and allows pointer hit testing through empty overlay space.
Environment
Framework: deck.gl 9.4.0; also reproduced against master 7fa7dc7
Browser: Chromium 147 (Playwright)
OS: Linux ARM64
Flavor: React
Validation / proposed fix
Reproduce against current master in a real browser layout.
Add a regression test that fails on the current code.
Verify a React widget-root layout fix for initial positioning, resize, and pointer hit testing.
The left pane uses upstream master with the widget root unpositioned; the right pane uses the PR fix. Both run the same standalone scatterplot. The recording hovers the left point first, then the right point twice.
The PR also keeps an internal positioned container independent of the outer wrapper’s user-configurable flow style. This preserves canvas and root-level widget placement with style={{position: "static"}}. The comparison below shows the original PR implementation (left) and the updated fix (right); the dashed outline marks the requested wrapper bounds.
Description
In React DeckGL, the
.deck-widgets-rootelement is an unpositioned sibling after.deck-events-root. It falls below the canvas in normal document flow.TooltipWidget.onHover()subtracts that root's offset throughWidgetManager.getCanvasBounds(), but the tooltip's absolutely positioned ancestors use the outer DeckGL wrapper as their containing block. The resulting tooltip can be placed above the map.Reproduced with deck.gl 9.4.0 and current master (
7fa7dc7) in headless Chromium on Linux. No widget stylesheet is imported.Expected behavior
The built-in
getTooltiptooltip should appear at the picked canvas position, including after resizing the React component.Steps to reproduce
Render the following React component, then hover over the red point in the center:
The tooltip text exists in the DOM, but its vertical position is above the map. The widget root has zero height and starts below the event root.
A browser regression test on current master with a 200×100 canvas at page offset (40, 60), hovering at canvas coordinate (50, 25), gets tooltip top -15px instead of 85px. Anchoring the React-owned widget root with
position: absolute; inset: 0; pointer-events: nonerestores the expected coordinates and allows pointer hit testing through empty overlay space.Environment
7fa7dc7Validation / proposed fix
The focused fix is in #10724.
Before / after recording
The left pane uses upstream master with the widget root unpositioned; the right pane uses the PR fix. Both run the same standalone scatterplot. The recording hovers the left point first, then the right point twice.
tooltip-before-after.webm
Screenshot while hovering the fixed pane:
Fix PR: #10724.
Static wrapper layout
The PR also keeps an internal positioned container independent of the outer wrapper’s user-configurable flow style. This preserves canvas and root-level widget placement with
style={{position: "static"}}. The comparison below shows the original PR implementation (left) and the updated fix (right); the dashed outline marks the requested wrapper bounds.