Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix problem with iOS beta 8 suggestions
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.
- Loading branch information