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

When EditContext.updateSelection is called with offset between a surrogate pair, what should happen? #28

Open
masayuki-nakano opened this issue Dec 13, 2021 · 1 comment
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.

Comments

@masayuki-nakano
Copy link

Options:

  1. Align to start and/or end of surrogate pair(s)
  2. Throw an exception
  3. Do nothing

Perhaps, w3c/editing#1 is reasonable. If selectionStart is middle of a surrogate pair, align to start (or end?) of the surrogate pair. If selectionEnd is middle of a surrogate pair, align to end (or start?) of the surrogate pair. (but if the range is collapsed in a surrogate pair, this logic extends the range, perhaps, this would cause unexpected behavior.)

@masayuki-nakano
Copy link
Author

And also updateText method shouldn't split surrogate pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.
Projects
None yet
Development

No branches or pull requests

3 participants