Use EUI tooltip for web capture items to prevent oversized drag ghost images#667
Merged
Use EUI tooltip for web capture items to prevent oversized drag ghost images#667
Conversation
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.
philmcmahon
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 adraggableelement, 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
ReactTooltipwithEuiToolTip(already used elsewhere in the project), which renders via a portal todocument.body. This keeps the tooltip outside the row's DOM subtree, producing a correctly-sized drag ghost.The icon, tooltip content, and all other behaviour are unchanged.