WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@12joan
Copy link
Contributor

@12joan 12joan commented May 23, 2025

Description
When composition starts and the placeholder is showing, Slate hides the placeholder. Due to a bug in Firefox, this causes macOS's IME to receive outdated information about the start offset of the composition. This PR works around this issue by rendering the placeholder after the cursor instead of before.

Issue
Fixes #5766

Example

image.mp4

Checks

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn fix.)
  • The relevant examples still work. (Run examples with yarn start.)
  • You've added a changeset if changing functionality. (Add one with yarn changeset add.)

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2025

🦋 Changeset detected

Latest commit: 8d00b2b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
slate-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dylans dylans merged commit 05263b5 into ianstormtaylor:main May 24, 2025
7 of 11 checks passed
@github-actions github-actions bot mentioned this pull request May 24, 2025
@github-actions github-actions bot mentioned this pull request Jun 2, 2025
@12joan
Copy link
Contributor Author

12joan commented Jul 3, 2025

The Firefox bug that made this workaround necessary will be resolved in Firefox 141. Noting this here so that anyone reading this in the future knows that this change is now safe to revert if it causes any unwanted side-effects.

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.

In Firefox ,When entering Japanese characters, the first letter will not be displayed after selection

2 participants