Skip to content

fix(timeline): prevent emoji color bleed in read receipt display names#303

Merged
Just-Insane merged 3 commits intodevfrom
fix/emoji-display-name-color
Mar 16, 2026
Merged

fix(timeline): prevent emoji color bleed in read receipt display names#303
Just-Insane merged 3 commits intodevfrom
fix/emoji-display-name-color

Conversation

@Just-Insane
Copy link
Collaborator

Summary

Fixes #267 — On Safari/iOS, colorful emoji in user display names (e.g. 🔴 Alice) bled their WebKit text fill color into adjacent text spans in the "following the conversation" indicator at the bottom of the timeline.

Root cause

WebKit's implementation of -webkit-text-fill-color propagates from emoji characters in a <b> tag into sibling elements under certain conditions. When a display name containing emoji was rendered as <b>🔴 Name</b>, the emoji's color fill propagated to adjacent <Text> spans like " and 2 others are following".

Fix

Added WebkitTextFillColor: 'inherit' to all <b> name tags in RoomViewFollowing.tsx to contain the WebKit fill color within the tag, and WebkitTextFillColor: 'currentColor' to the adjacent <Text as="span"> elements to restore the expected text color explicitly.

Applied to all 4 user-count rendering branches (1, 2, 3, and >3 users).

WebKit (Safari/iOS) has a rendering quirk where colorful emoji inside <b>
tags can contaminate the paint color of adjacent sibling text nodes. This
caused display names following a user with an emoji (e.g. '🔴 Alice') to
render with the emoji's color instead of the expected text color.

Apply -webkit-text-fill-color: inherit on <b> name tags and
-webkit-text-fill-color: currentColor on the following <Text as="span">
elements. This explicitly resets the WebKit fill color chain at each step,
preventing emoji paint properties from cascading into sibling spans.

Fixes #267
@Just-Insane Just-Insane requested a review from a team March 16, 2026 19:08
@github-actions
Copy link
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-303-sable.raspy-dream-bb1d.workers.dev 44e87e7 pr-303 Mon, 16 Mar 2026 19:29:47 GMT

@Just-Insane Just-Insane added this pull request to the merge queue Mar 16, 2026
Merged via the queue into dev with commit 7257255 Mar 16, 2026
8 checks passed
<>
<b>{names[0]}</b>
<Text as="span" size="Inherit" priority="300">
<b style={{ WebkitTextFillColor: 'inherit' }}>{names[0]}</b>
Copy link
Member

@dozro dozro Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason why we mix raw html <b> and react components <Text> here, i always wondered lol

@Just-Insane Just-Insane deleted the fix/emoji-display-name-color branch March 17, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

emoji in display name causes discoloration in read receipts for following user names

2 participants