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

Emoji gets inserted one character earlier than it should (?) #2626

Closed
nonnullish opened this issue Feb 25, 2024 · 2 comments · Fixed by #2645
Closed

Emoji gets inserted one character earlier than it should (?) #2626

nonnullish opened this issue Feb 25, 2024 · 2 comments · Fixed by #2645
Labels
c: bug Something isn't working s: pending triage Pending Triage

Comments

@nonnullish
Copy link
Contributor

nonnullish commented Feb 25, 2024

It seems that the emoji get inserted one character earlier than they should.

Tested on: iPhone 11 with iOS 17.3.1, Elk v0.11.0 installed as a PWA / bookmark.
Steps to reproduce:

  1. Compose a new post, write for example "12345".
  2. Move cursor between 3 and 4 and insert an emoji from the emoji keyboard.
  3. The emoji appears between 2 and 3.

Here's a screen recording:
https://github.com/elk-zone/elk/assets/20538005/1258c4c4-3aee-4f3f-90b8-c25c17a24acf

@nonnullish nonnullish added c: bug Something isn't working s: pending triage Pending Triage labels Feb 25, 2024
Copy link

stackblitz bot commented Feb 25, 2024

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@shuuji3
Copy link
Member

shuuji3 commented Feb 26, 2024

I also observed the same issue when I inserted an emoji but in my case with the IME conversion.

  • Version: Elk v0.11.0 / Canary 6dc5a68
  • macOS (Google Japanese IME) / Linux (mozc)
  • Google Chrome / Firefox
emoji-left-insert.mp4

Maybe the calculation of the insertion position is incorrect in case the inserted character type is emoji. I don't see this shift issue when inserting Japanese characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working s: pending triage Pending Triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants