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

bug(ios): paragraph-initial lone diacritic deletion desynchronizes context, also deletes preceding newline #10892

Open
jahorton opened this issue Feb 29, 2024 · 0 comments
Milestone

Comments

@jahorton
Copy link
Contributor

As discovered during user-testing of #10589, properties of the iOS textDocumentProxy interface, its asynchronous management of the active, jumping context window, and of Swift's handling of String data all come together to cause some nasty unwanted effects in certain scenarios.

While the exact cut-off point where the internal 'context window' jumps may vary from iOS device to device, the following repro should exhibit the problem pretty simply:

  1. Find a keyboard that can emit exposed, free-standing diacritics or combining marks. For example, my diacritic_rota keyboard used for testing the implementation of gestures.
  2. Press ENTER, then type a diacritic.
  3. (optional) Deactivate the Keyman keyboard - you can do this next part with the actual iOS system keyboard!
  4. Press Backspace.

One of two things will happen (assuming the context-window bit is properly set up):

  1. The application and keyboard will instantly crash:
RPReplay_Final1709196283.MP4
  1. The ENTER key's newline will also be deleted.

Note - this is with Keyman fully deactivated! Naturally, the same things happen when Keyman is active, likely for the same reasons.

For some other thoughts on this, #10589 (comment)

Part of me wonders if it's possible to work around by tracking the context manually on the iOS side and undoing the newline's deletion by use of our tracked data. It's only an idea, though, and it's likely too big a project to tackle during the beta cycle.

@jahorton jahorton added this to the Future milestone Feb 29, 2024
@jahorton jahorton linked a pull request Mar 1, 2024 that will close this issue
1 task
@jahorton jahorton removed a link to a pull request Mar 4, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant