Skip to content

🐛 Fixed Mastodon settings input overwriting#28015

Draft
AsishKumarDalal wants to merge 1 commit into
TryGhost:mainfrom
AsishKumarDalal:fix-mastodon-validation
Draft

🐛 Fixed Mastodon settings input overwriting#28015
AsishKumarDalal wants to merge 1 commit into
TryGhost:mainfrom
AsishKumarDalal:fix-mastodon-validation

Conversation

@AsishKumarDalal
Copy link
Copy Markdown

@AsishKumarDalal AsishKumarDalal commented May 21, 2026

This PR fixes a frustrating issue where typing a Mastodon handle (e.g., @username@instance.tld) in the social settings would immediately overwrite the input and cause the cursor to jump mid-typing.

To fix this:

  1. We still validate onChange so users see formatting errors immediately, but we don't overwrite or format the value yet.
  2. The actual normalization/formatting and state updates are deferred to onBlur (when clicking away).
  3. Added a final normalization check onSave in case the user hits save directly.

This matches how other social media fields in Ghost behave and makes typing handles smooth.

  • I've read and followed the Contributor Guide
  • I've explained my change
  • I've written an automated test to prove my change works

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6138306f-ef46-4da6-9cfe-e868b94b8ee7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AsishKumarDalal AsishKumarDalal changed the title Fix Mastodon settings validation and input overwriting onChange 🐛 Fixed Mastodon settings input overwriting May 21, 2026
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.

1 participant