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
{{ message }}
Repository navigation
ContextMenu: migrate trigger to display:contents wrapper (align with Tooltip/HoverCard) #3629
ContextMenu renders its right-click trigger as a real styled box (styles.trigger) that hugs its content. This diverges from the rest of the Layer family: HoverCard and Tooltip use a display: contents trigger wrapper so the trigger is the child element — refs are preserved and no extra box is introduced.
The content box means consumers who need the whole area to be right-clickable have to style the wrapper. #3441 added a triggerXstyle prop as a stopgap for the Table full-cell case, but a better long-term fix is to make ContextMenu's trigger display: contents (or fill its container) like the sibling components, and remove the need for the escape hatch.
Do this alongside #3465 (anchor the menu to the right-click target — scroll-follow + auto-flip), since both change how the trigger and menu anchor/position. Migrating the trigger wrapper and reworking positioning in one pass avoids two churny refactors of the same code.
Trigger uses display: contents (align with Tooltip/HoverCard)
Re-evaluate / deprecate triggerXstyle once the trigger fills naturally
Superseded by the positioning work in #3866. That approach keeps the trigger's bounding box (needed for correct positioning across scroll containers), which means triggerXstyle stays supported — so the display: contents migration is a non-goal for now.
Activity
cixzhang commentedon Jul 12, 2026
Superseded by the positioning work in #3866. That approach keeps the trigger's bounding box (needed for correct positioning across scroll containers), which means
triggerXstylestays supported — so thedisplay: contentsmigration is a non-goal for now.Closing as not planned.