Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(signup): prevent Chrome translate DOM crash on paper-desk signup (#71012)

Eleftheria Trivyzakifc7ebac7276e
diff --git a/frontend/src/scenes/authentication/shared/paperDesk/Typewriter.tsx b/frontend/src/scenes/authentication/shared/paperDesk/Typewriter.tsx
index a18cf660d495..398aac855868 100644
--- a/frontend/src/scenes/authentication/shared/paperDesk/Typewriter.tsx
+++ b/frontend/src/scenes/authentication/shared/paperDesk/Typewriter.tsx
@@ -39,6 +39,10 @@ export function Typewriter({ lines }: { lines: string[] }): JSX.Element {
<div
className="absolute top-[clamp(20px,4vh,40px)] left-[clamp(20px,4vw,44px)] z-[2] min-h-[2.6em] font-mono text-xs leading-relaxed whitespace-pre"
aria-hidden
+ // Chrome's in-page translation replaces text nodes with <font> elements; on this
+ // 40ms-tick animation React then crashes removing text it no longer owns
+ // (removeChild NotFoundError, react#11538). Decorative code-style notes — never translate.
+ translate="no"
>
{parts.map((part, idx) => (
<div key={idx} className="text-primary/50 first:font-semibold">
diff --git a/frontend/src/scenes/authentication/signup/signupForm/TurnstileChallenge.tsx b/frontend/src/scenes/authentication/signup/signupForm/TurnstileChallenge.tsx
index 3edfb61a09ba..7d002be93d6e 100644
--- a/frontend/src/scenes/authentication/signup/signupForm/TurnstileChallenge.tsx
+++ b/frontend/src/scenes/authentication/signup/signupForm/TurnstileChallenge.tsx
@@ -55,7 +55,9 @@ export function TurnstileChallenge({ siteKey, onSuccess, tokenReceived, email }:
</LemonButton>
{failureCount >= 2 && (
<p className="text-sm text-secondary">
- Having trouble signing up?{' '}
+ {/* Text is span-wrapped so Chrome's in-page translation (which replaces bare text
+ nodes with <font> elements) can't break React sibling ops — react#11538 */}
+ <span>Having trouble signing up?</span>{' '}
<Link
data-attr="turnstile-error-contact-support"
onClick={(e) => {
diff --git a/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx b/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
index ee86da8b1fdd..e92c0950dd97 100644
--- a/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
+++ b/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
@@ -23,6 +23,9 @@ import { LoginMethod } from '~/types'
import { signupLogic } from '../../signupForm/signupLogic'
+// Bare text nodes below are wrapped in <span>s: Chrome's in-page translation replaces text
+// nodes with <font> elements, which crashes React's sibling insert/remove operations
+// (removeChild/insertBefore NotFoundError, see react#11538). Text inside its own element is safe.
const NOTES: Record<number, string[]> = {
0: ['// create an account', '// 1M events free, every month'],
1: ['// step 2 of 2', '// make it a good one'],
@@ -44,7 +47,7 @@ function SignupEmailPanel(): JSX.Element {
const footer = preflight?.demo ? undefined : (
<p className="mt-5 mb-0 text-sm text-secondary text-center">
- Already have an account?{' '}
+ <span>Already have an account?</span>{' '}
<Link
to={loginUrl}
data-attr="signup-login-link"
@@ -144,9 +147,9 @@ function PendingInvitePanel(): JSX.Element {
title="You've already been invited"
sub={
<span>
- <b className="text-primary">{org}</b> invited{' '}
- <span className="PaperDesk__mono">{signupPanelEmail.email}</span> to join them on PostHog. The
- invite link is in your inbox.
+ <b className="text-primary">{org}</b> <span>invited</span>{' '}
+ <span className="PaperDesk__mono">{signupPanelEmail.email}</span>{' '}
+ <span>to join them on PostHog. The invite link is in your inbox.</span>
</span>
}
className="mb-5"
@@ -200,15 +203,15 @@ function SignupAuthPanel(): JSX.Element {
const footer = (
<>
<p className="PaperDesk__terms mt-5 mb-0 text-xs leading-relaxed text-tertiary text-center">
- By creating an account, you agree to our{' '}
+ <span>By creating an account, you agree to our</span>{' '}
<Link to="https://posthog.com/terms" target="_blank">
Terms of Service ↗
</Link>{' '}
- and{' '}
+ <span>and</span>{' '}
<Link to="https://posthog.com/privacy" target="_blank">
Privacy Policy ↗
</Link>
- .
+ <span>.</span>
</p>
<p className="mt-3 mb-0 text-sm text-secondary text-center">
<Link
@@ -227,13 +230,13 @@ function SignupAuthPanel(): JSX.Element {
title="Secure your account"
sub={
<span>
- Signing up as <span className="PaperDesk__mono">{signupPanelEmail.email}</span>
+ <span>Signing up as</span> <span className="PaperDesk__mono">{signupPanelEmail.email}</span>
</span>
}
/>
{passkeyError && (
<div className="mb-4 py-2.5 px-3 text-sm leading-normal text-primary text-left bg-danger-highlight border border-danger rounded">
- {passkeyError}
+ <span>{passkeyError}</span>
</div>
)}
{passkeySignupEnabled &&
@@ -332,15 +335,17 @@ function SignupProfilePanel(): JSX.Element {
const footer = (
<>
<p className="PaperDesk__terms mt-5 mb-0 text-xs leading-relaxed text-tertiary text-center">
- By {preflight?.demo ? 'entering the demo environment' : 'creating an account'}, you agree to our{' '}
+ <span>
+ By {preflight?.demo ? 'entering the demo environment' : 'creating an account'}, you agree to our
+ </span>{' '}
<Link to="https://posthog.com/terms" target="_blank">
Terms of Service ↗
</Link>{' '}
- and{' '}
+ <span>and</span>{' '}
<Link to="https://posthog.com/privacy" target="_blank">
Privacy Policy ↗
</Link>
- .
+ <span>.</span>
</p>
{!preflight?.demo && (
<p className="mt-5 mb-0 text-sm text-secondary text-center">
@@ -361,13 +366,14 @@ function SignupProfilePanel(): JSX.Element {
title="Tell us about yourself"
sub={
<span>
- Setting up the account for <span className="PaperDesk__mono">{signupPanelEmail.email}</span>
+ <span>Setting up the account for</span>{' '}
+ <span className="PaperDesk__mono">{signupPanelEmail.email}</span>
</span>
}
/>
{signupPanelOnboardingManualErrors?.generic && (
<div className="mb-4 py-2.5 px-3 text-sm leading-normal text-primary text-left bg-danger-highlight border border-danger rounded">
- {signupPanelOnboardingManualErrors.generic.detail || 'Could not complete your signup.'}
+ <span>{signupPanelOnboardingManualErrors.generic.detail || 'Could not complete your signup.'}</span>
</div>
)}
<Form