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

The Emoji Keyboard Has Grapheme Cluster error #22

Open
BulkinKing opened this issue Jul 17, 2023 · 2 comments
Open

The Emoji Keyboard Has Grapheme Cluster error #22

BulkinKing opened this issue Jul 17, 2023 · 2 comments
Labels
bug Something isn't working low priority This issue is unlikely to be resolved in the near future due to maintainers' priorities PR Contributors are encouranged to submit a pull request. Just ask in case you are interested.

Comments

@BulkinKing
Copy link

BulkinKing commented Jul 17, 2023

**It Does happen in OpenBoard too

Describe the bug
When you Type any Emoji with zero width joiner it handles the most recent emoji correctly but Creates issue in remaining emoji

To Reproduce
Steps to reproduce the behavior:

  1. Go to Emoji Section
  2. Click on People Category
  3. Scroll down to any Family emoji or colored emoji or Flags Category eg:👩‍👩‍👧👩‍👩‍👧‍👦👩‍👩‍👦‍👦👋🏿👋🏿🇺🇸🇱🇰🇮🇳 it handles the most recent emoji correctly**

Expected behavior
The whole cluster must be removed on backspace pressed the most recent cluster will be removed as in the example 👩‍👩‍👧👩‍👩‍👧‍👦👩‍👩‍👦‍👦👋🏿👋🏿🇺🇸🇱🇰🇮🇳 the Indian flag will be removed correctly other will create issue on backspace press

Screenshots
If applicable, add screenshots to help explain your problem

Smartphone (please complete the following information):

  • Device: Poco X3/Redmi note 9/Honor 6x
  • OS: 12/12/7
@BulkinKing BulkinKing added the bug Something isn't working label Jul 17, 2023
@Helium314 Helium314 added the PR Contributors are encouranged to submit a pull request. Just ask in case you are interested. label Jul 17, 2023
@Helium314
Copy link
Owner

Helium314 commented Jul 17, 2023

The problem seems to be in https://github.com/Helium314/openboard/blob/aba68b114beead9c11aa939d3098774718af597c/app/src/main/java/org/dslul/openboard/inputmethod/latin/inputlogic/InputLogic.java#L1188-L1190
lengthToDelete is always 2 for emojis, but the actual necessary length may be (much!) more and depends on the emoji.
How to get the correct length? I have no idea...

Using sendDownUpKeyEvent(KeyEvent.KEYCODE_DEL) when pressing delete works, but this causes issues with suggestions.

@Helium314 Helium314 added the low priority This issue is unlikely to be resolved in the near future due to maintainers' priorities label Aug 27, 2023
@Helium314
Copy link
Owner

This is improved with ffe7d81, but may still occur for some emojis, or other characters.
Also it still happens when using delete swipe, as this is char-based (should be fixed in InputLogic).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority This issue is unlikely to be resolved in the near future due to maintainers' priorities PR Contributors are encouranged to submit a pull request. Just ask in case you are interested.
Projects
None yet
Development

No branches or pull requests

2 participants