Skip to content

Handle special case for Vietnamese input on iOS to prevent accidental deletion of embedded objects #2580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kido-luci
Copy link

@kido-luci kido-luci commented May 26, 2025

Description

*On iOS, we need to handle a special case where user input modifies a previous word. For example, in Vietnamese keyboard with the Telex input method,the word "dinh" becomes "đinh" when the user types "d". iOS handles this by deleting several characters from the end of the word to the beginning (plus one extra character) and then re-inserting the updated characters.

The issue arises when the word is adjacent to an embedded object (e.g., an embedded block). iOS may accidentally remove the embedded object character (\uFFFC) during this replacement process. To prevent this, we should skip updating the text value if the change affects the starting character and is next to an embedded block.*

Related Issues

Embedded block is deleted after input a special Vietnamese character#2578.

Type of Change

  • Feature: New functionality without breaking existing features.
  • 🛠️ Bug fix: Resolves an issue without altering current behavior.
  • 🧹 Refactor: Code reorganization, no behavior change.
  • Breaking: Alters existing functionality and requires updates.
  • 🧪 Tests: New or modified tests
  • 📝 Documentation: Updates or additions to documentation.
  • 🗑️ Chore: Routine tasks, or maintenance.
  • Build configuration change: Build/configuration changes.

Fixed demo

Simulator Screen Recording - iPhone 16 Plus - 2025-05-26 at 20 11 50

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