Grommet: Cursor loses position in TextInput

Created on 29 Jan 2020  路  3Comments  路  Source: grommet/grommet

Expected Behavior

When editing text in a TextInput, I enter a string (abc). Then, I move the cursor to the beginning of the string, and start typing (123). My cursor should remain when I put it, giving me "123abc"

Actual Behavior

When editing text in a TextInput, I enter a string (abc). Then, I move the cursor to the beginning of the string, and start typing (123). After entering one character, my cursor jumps to the end of the input. Giving me "1abc23".

URL, screen shot, or Codepen exhibiting the issue

The problem is visible in the storybook of the most recent version of Grommet.

Most helpful comment

Thanks for reporting, the fix will be available on our next release.

All 3 comments

Thanks for reporting, the fix will be available on our next release.

@ShimiSun Thanks for the quick work. Will this only be going into Grommet v2, or will it make it into v1 as well? We still have a project using v1. Thanks.

Hi @csclyde , thanks for your patience.
Looking at the code for this fix, it is very specific for v2 and wouldn't work on v1, more specifically v1 doesn't use React hooks (react version of ^16.8) so the fix couldn't be apply there.

If you have an idea for a fix on v1, feel free to directly fix it on your local version, we do not have the resources to upgrade and have new releases on v1 at this point, unfortunately.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoeButler7 picture JoeButler7  路  3Comments

Kitanotori picture Kitanotori  路  4Comments

ezu picture ezu  路  4Comments

nomadus picture nomadus  路  4Comments

DanielBaird picture DanielBaird  路  3Comments