Skip to content

Conversation

@jorgemanrubia
Copy link
Member

iOS beta 8 renders a preview of the suggestion that messes up with text composing in Trix. You may end up with misspelled words when typing in the suggested term. For example:

  1. Type: "kno".
  2. iOS suggests "know".
  3. Type: "w"

The final word is "knww".

The problem is the system that handles compositionend events, which relies on deleting the composed text. When that only has one character, we default to performing a regular delete operation. The problem with the new iOS dimmed suggestions is that this matches the interaction of typing in the last character in a suggestion, and it results in Trix wrongly deleting legit content when discarding the suggestion.

This solution relaxes the condition to rely on the range when there is a length of one when the editor is in composing mode.

@jorgemanrubia jorgemanrubia force-pushed the bug+safari-autocomplete branch 3 times, most recently from 54fedcf to c349489 Compare June 26, 2024 14:57
iOS beta 8 renders a preview of the suggestion that messes up with text composing in Trix. You may end
up with misspelled words when typing in the suggested term. For example:

1. Type: "kno".
2. iOS suggests "know".
3. Type: "w"
4. The final word is "knww".

The problem is the system that handles compositionend events, which relies on deleting the composed text.
When that only has one character, we default to performing a regular delete operation. The problem
 with the new iOS dimmed suggestions is that this matches the interaction of typing in the last character
 in a suggestion, and it results in Trix wrongly deleting legit content when discarding the suggestion.

This solution relaxes the condition to rely on the range when there is a length of one when the editor
is in composing mode.
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.

2 participants