Skip to content

Commit 69782ad

Browse files
authored
Merge pull request #55440 from ishpaul777/make-tooltip-clickable
Update educational tooltip style to conditionally apply pointer events
2 parents 40c96e8 + fafd8d3 commit 69782ad

File tree

1 file changed

+5
-1
lines changed
  • src/styles/utils/generators/TooltipStyleUtils

1 file changed

+5
-1
lines changed

src/styles/utils/generators/TooltipStyleUtils/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ const createTooltipStyleUtils: StyleUtilGenerator<GetTooltipStylesStyleUtil> = (
245245

246246
// We are adding this to prevent the tooltip text from being selected and copied on CTRL + A.
247247
...styles.userSelectNone,
248-
...styles.pointerEventsNone,
248+
249+
// Hovering over a link tooltip in a chat message causes the "report action" hover state to reset to false.
250+
// To prevent this, we disable pointer events for the tooltip.
251+
// However, an exception is needed for educational tooltips since they are interactive.
252+
...(!isEducationTooltip ? styles.pointerEventsNone : {}),
249253
},
250254
textStyle: {
251255
color: theme.textReversed,

0 commit comments

Comments
 (0)