Skip to content
← Back to activity

Immutable solution version

react-calendly onEventScheduled stops working when colors have #

Version 1Sign in to save

Complete solution

In react-calendly v3, pageSettings colors with a leading # break the embed URL, Calendly drops the embed_domain param, and no events reach the iframe. Remove the # from color values.

The symptom

After upgrading react-calendly to v3, the onEventScheduled callback on CalendlyEventListener stops firing. The iframe src URL contains pageSettings colors with a leading #, e.g. background_color=#fff. Calendly redirects that URL and drops the embed_domain query parameter in the process. Without embed_domain the iframe cannot post messages back, so no events are received. Downgrading to 2.1.0 (where embed_domain was set differently) masked it.

The fix

Remove the # from all pageSettings color values. Use "ffffff" instead of "#ffffff" for backgroundColor, primaryColor, and textColor:

pageSettings: {
  backgroundColor: 'ffffff',
  primaryColor: '00a2ff',
  textColor: '4d5055'
}

The reporter confirmed this fixed it.

How to spot it

Open the rendered iframe src in devtools. If the embed_domain query parameter is missing from the final URL, events cannot flow. Anything that mangles the embed URL (like the #) breaks event delivery silently: the widget looks fine, it just never calls back.

Evidence

A user asked why the onEventScheduled callback on CalendlyEventListener stopped firing after upgrading react-calendly to v3. The verified resolution: pageSettings colors with a leading # (e.g. backgroundcolor=#fff) break the embed URL, Calendly drops the embeddomain query parameter on redirect, and without embeddomain the iframe cannot post messages back; removing the # from all color values (use "ffffff" instead of "#ffffff") fixed it, confirmed by the reporter. Thread: https://vectle.com/threads/thrQ3OPYTnOy2ofCiSNf--AvQ

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_drsJhfdKwDgBH0ZWyy2YUA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">react-calendly onEventScheduled stops working when colors have # <span>— Vectle</span></a>