Skip to content
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

Text suggestions and autocorrect don't work on iOS #761

Open
JBYoshi opened this issue Dec 9, 2021 · 4 comments
Open

Text suggestions and autocorrect don't work on iOS #761

JBYoshi opened this issue Dec 9, 2021 · 4 comments
Labels

Comments

@JBYoshi
Copy link
Contributor

JBYoshi commented Dec 9, 2021

When typing into the editor on iOS, the text suggestion bar doesn't behave normally:

  • The first letter typed acts as if it is its own word (for example, typing "H" suggests "h I", "h is", "h you").
  • Further letters typed do not update the suggestions.
  • Typos are not suggested for autocorrect, even when they would be in other contexts.

Based on my research into this issue, it seems to be related to calling preventDefault() on the key events. Using onbeforeinput instead does not have this problem.

Video: https://user-images.githubusercontent.com/12983479/145438053-7c590790-52fe-42ff-a994-225f2005035c.mov

Tested on https://bustle.github.io/mobiledoc-kit/demo/debug.html using Safari on iOS 15.1. Originally reported as TryGhost/Ghost#13097.

@kevinansfield
Copy link
Collaborator

This is a rough duplicate of #621 - there's a lot more details in there about the cause if anyone wants to dig in and work on a PR.

@s00500
Copy link

s00500 commented Aug 8, 2022

@JBYoshi This seems to be linked to inserting emoji as well, do you have a repo of you experiments you did so far?

@JBYoshi
Copy link
Contributor Author

JBYoshi commented Aug 10, 2022

It's been a while since I looked at this, but I pushed a copy of my workspace with some work-in-progress stuff. JBYoshi@66a36a4 is the original state of my workspace last I worked on it. I've merged in the latest changes to https://github.com/JBYoshi/mobiledoc-kit/tree/input-events.

@JBYoshi
Copy link
Contributor Author

JBYoshi commented Aug 11, 2022

For the emoji setup, it turns out that there is a separate piece of the code that's not behaving properly; using input events instead just bypasses the broken code. I created a separate PR to fix the original bug with emojis: #764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants