Skip to content

Use EUI tooltip for web capture items to prevent oversized drag ghost images#667

Merged
hoyla merged 1 commit intomainfrom
ljh-web-capture-drag
Apr 7, 2026
Merged

Use EUI tooltip for web capture items to prevent oversized drag ghost images#667
hoyla merged 1 commit intomainfrom
ljh-web-capture-drag

Conversation

@hoyla
Copy link
Copy Markdown
Contributor

@hoyla hoyla commented Apr 4, 2026

Fixes #666

When dragging web capture files or folders in a workspace, the drag ghost image appeared to include surrounding rows, making it look like multiple items were being moved:

Cause

The ReactTooltip (v4) component used for the "Captured from URL" globe icon rendered its tooltip DOM inline within the <tr> subtree. When the browser generates a drag ghost image for a draggable element, it captures the entire subtree — including the tooltip's positioned div — making the ghost appear oversized and encompass neighbouring rows.

This only affected web capture items because they were the only rows with an inline ReactTooltip.

Fix

Replaced ReactTooltip with EuiToolTip (already used elsewhere in the project), which renders via a portal to document.body. This keeps the tooltip outside the row's DOM subtree, producing a correctly-sized drag ghost.

Before After

The icon, tooltip content, and all other behaviour are unchanged.

  • Local
  • Playground

Replace ReactTooltip with EuiToolTip for the 'Captured from URL' globe
icon tooltip in workspace tree rows. ReactTooltip v4 renders its tooltip
DOM inline within the table row's subtree, so when the browser generates
a drag ghost image for a draggable <tr>, it captures the tooltip's
positioned div, making the ghost appear to encompass neighbouring rows.

EuiToolTip renders via a portal to document.body, keeping the tooltip
outside the row's DOM and producing a correctly-sized drag ghost.
@hoyla hoyla requested a review from a team as a code owner April 4, 2026 13:12
@hoyla hoyla added workspaces ux/ui fix Departmental tracking: fix labels Apr 4, 2026
@hoyla hoyla changed the title Fix drag ghost image for web capture items in workspaces Use EUI tooltip for web capture items to prevent oversized drag ghost images Apr 4, 2026
@hoyla hoyla merged commit 2da820b into main Apr 7, 2026
20 of 21 checks passed
@hoyla hoyla deleted the ljh-web-capture-drag branch April 7, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Departmental tracking: fix ux/ui workspaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Giant workspaces: drag web capture items bug

2 participants