Android - Emoji - Cursor is not in front of the emoji
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Expected Result
Cursor position should display in front of the emoji
Actual Result
Cursor position is not in front of the emoji. Sometimes is behind the emoji and sometimes 2 characters ahead.
Action Performed
- Launch the app
- Log in with any account
- Type some text
- Add emoji in the middle of text
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platform:
Where is this issue occurring?
Web iOS Android ✔️ Desktop App Mobile Web
Version Number: 1.0.55-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Expensify/Expensify Issue URL:
Originally posted here: https://github.com/Expensify/Expensify.cash/pull/3080#issuecomment-849069503
CC @aliabbasmalik8
Going to unassign myself and set it as weekly given that there's an easy workaround on Android by just using the native emoji picker. @aliabbasmalik8 brought up what the issue is in this comment here.
Issue reproducible today during KI retests
SOLUTION for android It can be fixed by adding
this.textInput.setNativeProps({selection: updatedSelection});
at here https://github.com/Expensify/Expensify.cash/blob/e95f5a3d07408794e8055b955f1a5666a9508e0c/src/pages/home/report/ReportActionCompose.js#L288
Actually selection props have some serious problem with native platforms you can see on this link
github.com/facebook/react-native/issues/29063 so we can fix it by using direct manipulation like mentioned above
REF: https://reactnative.dev/docs/direct-manipulation#:~:text=It%20is%20sometimes%20necessary%20to,for%20views%20in%20mobile%20apps.
Thanks
@aliabbasmalik8 this should be fixed as part of https://github.com/Expensify/Expensify.cash/pull/3080 -- all fixes submitted should resolve the issue for all platforms. In your PR you flagged that you tested Android but it was not addressed in your fix.
@jboniface yeah, I'm on it, just want to discuss the solution for this issue because selection has some issue on android.
yes, I tested on Android as well but it did not produce every time on android so that's the reason it missed.
Issue reproducible today during KI retests