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

Editor Component string fields cursor jumps to end of line after each keypress #3578

Closed
kwyoung11 opened this issue Apr 11, 2020 · 8 comments · Fixed by #4607
Closed

Editor Component string fields cursor jumps to end of line after each keypress #3578

kwyoung11 opened this issue Apr 11, 2020 · 8 comments · Fixed by #4607
Labels
area: extensions/editor-components type: bug code to address defects in shipped code

Comments

@kwyoung11
Copy link
Contributor

kwyoung11 commented Apr 11, 2020

Describe the bug
In any Editor Component registered via CMS.registerEditorComponent(), the cursor in string fields jumps to the end of the line after every keypress, making it difficult to edit.

To Reproduce

  1. Go to https://cms-demo.netlify.com/#/collections/posts/new
  2. In the body (the markdown widget), click the '+' dropdown in the markdown toolbar and add a Youtube block
  3. Add any text to the id field. Now place your cursor at the beginning of that text, and add a character.
  4. See the cursor jump the end of the line.

Expected behavior
The cursor should not jump the end of the line when editing the text.

Screenshots
https://imgur.com/a/8JCbZgA

Applicable Versions:

  • Netlify CMS version: Since at least 2.10.32
  • Git provider: GitHub
  • OS: Mac OSX
  • Browser version Chrome 80.0.3987.149
  • Node.JS version: 12.x
@erezrokah erezrokah added type: bug code to address defects in shipped code area: extensions/editor-components labels Apr 12, 2020
@kwyoung11
Copy link
Contributor Author

This bug was introduced in #2828. Is it possible to get that branch restored so that I can pull it down locally? I want to try a git bisect on it to narrow down what caused it.

@erezrokah
Copy link
Contributor

Hi @kwyoung11, thank you for looking into this. The restore branch option is no longer available. You could checkout the commit prior to that PR merge.

@sn3h
Copy link

sn3h commented Aug 11, 2020

Hello,

described behavior is happening again at Image widget text fields (alt and description). Cursor jumps to the end of the field after each keystroke

@idrisadetunmbi
Copy link

Getting this same behavior.

@1alexvash
Copy link

1alexvash commented Sep 24, 2022

@kwyoung11 Still recurring for me, it's embarrassing 😐

Do you have a fix for it?

@tcbcn
Copy link

tcbcn commented Oct 4, 2022

@1alexvash I have what appears to be the same problem, in the main CMS window. Happens in both Chrome and Safari. Is this the same bug or a different one, do you think?

Edit: the fix is here, in case you didn't see it.

@mz-mc
Copy link

mz-mc commented Oct 21, 2022

Confirming this is still an issue, and that the fix mentioned by @tcbn works.

@crs1138
Copy link

crs1138 commented Apr 16, 2024

Was this ever resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: extensions/editor-components type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants