Skip to content

Tooltips inconsistent behavior when interacting ( hovering, editing or dragging ) #3891

Description

@UdayHyma

Describe the bug
Tooltip interactions on token items in the plugin are inconsistent. They frequently fail to appear on hover, appear with significant delay, or remain stuck showing a previous token's tooltip, or do not show at all.

To Reproduce

Drag interaction breaking tooltips:

Open a project with tokens in grid or list view
Click and hold any token button, move the mouse slightly as if starting a drag, then release without completing the drop
Hover over other tokens
Tooltips no longer appear for any token until the cursor is moved completely out of the token area and back in

Rapid hover inconsistency:

Open a project with multiple tokens visible (grid view with color tokens is easiest to test)
Move the mouse across several tokens at a normal browsing speed
Tooltips either don't appear, appear with noticeable lag, or show for the wrong token

Edit form breaking tooltips:

Cmd/Ctrl+click a token to open the edit form
Press Escape to close the edit form
Hover over tokens
Tooltips do not appear until the cursor is moved fully away from all tokens and back

Expected behavior
Tooltips should appear reliably and immediately when hovering any token item, dismiss cleanly when the cursor leaves, and work consistently after drag interactions, context menu usage, and closing the edit form.

Screenshots or Screencasts

Screen.Recording.2026-06-09.at.4.21.11.PM.mov

Technical notes
Root cause is three interacting issues in the tooltip stack:

DraggableWrapper.tsx calls e.stopPropagation() on all drag events. When a drag ends the browser fires dragend but does not re-fire pointerenter for the element under the cursor. Radix Tooltip depends on pointerenter/pointerleave to track hover state so after any drag the tooltip system loses track of the cursor.
Each token creates its own Tooltip.Root (via @tokens-studio/ui v0.9.0) with delayDuration=0. The single Tooltip.Provider in startup.tsx uses the default skipDelayDuration=300ms. When moving between tokens quickly the Provider's coordination gets overwhelmed by simultaneous open/close calls across many independent Tooltip.Root instances.
TokenTooltip.tsx passes label="" (falsy) when the edit form is open, causing @tokens-studio/ui to fully unmount the Radix Tooltip tree. On remount after the edit form closes, no pointerenter fires because the cursor is already over the trigger so Radix never detects it.

EventPublisher.publish_batch already exists as a bulk alternative and could replace the per-token publish loop in the destroy action.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
📥 Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions