ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Cursor goes to beginning if you click on the margin-top area of a list when first element is nested.

Open atul-kumar-sentieo opened this issue 6 years ago • 5 comments

Steps to Reproduce

  1. Make any list
  2. Make a nested list after the first element.
  3. Click on the margin-top area of the outer list.

Current Result Cursor goes to the beginning.

GIF ckeditor_5_indented_bullet_click_issue

Description: If you click on the margin-top of any list when first element is nested, then cursor goes to the beginning

Screenshot from 2019-10-07 18-23-06

atul-kumar-sentieo avatar Oct 07 '19 13:10 atul-kumar-sentieo

Hi, thank you for the report. I can confirm this behaviour. It occurs only in Chrome and Safari on macOS.

Mgsy avatar Oct 08 '19 08:10 Mgsy

I have the same issue when I delete a word, with the last letter that is close to a space. Happens on MacOS, with Firefox, Chrome, and Vivaldi.

MichelBiezunski avatar Jul 26 '21 21:07 MichelBiezunski

I'm using the ckeditor5 api for react, so not the classic version, but I had the same issue and found a solution.

The solution was to add the following to the onChange method. <CKEditor onChange={() => _debounce(onBlur, 500)} />

Passing a debounced onBlur to the CKEditor's onChange ensures that the parent's state always gets updated with the debounce preventing performance issues from Redux dispatches on every keystroke.

And calling it with an arrow function enforces to bind the context of this and prevents the cursor from jumping to the top in my case.

fcallegari7 avatar Mar 23 '22 20:03 fcallegari7

I'm seeing this bug now (recording from the CKEditor 5 demo below).

Cursor jumps to the beginning of a bulleted item when:

  • Bulleted item has a nested list (always)
  • Bulleted item had a nested list that was deleted during the current editing session (when text is reloaded or copy-pasted into the editor, this is no longer an issue)

Is there a timeframe for getting a fix?

https://user-images.githubusercontent.com/10264738/167156132-c0f57ced-ff6e-4d07-9acd-acaf7391b507.mov

Jesterwocky avatar May 06 '22 14:05 Jesterwocky

@fcallegari7 - I am also facing the similar issue. I am also using react version of CKEditor 5. When user keeps on entering text there is a auto save of content API call which is happening in the background. But when it is completed in some case the cursor position is going to beginning.

Can you please provide more details on your fix.

Even after render is called the cursor position should not be changed.

Awaiting for your response

rakeshgujjar avatar Feb 20 '24 07:02 rakeshgujjar

The original problem (margin-top clicking) is not reproducible in the demos, and I treat it as solved. @rakeshgujjar please create a new issue detailing your issue as it's not related to this ticket.

Witoso avatar Feb 27 '24 16:02 Witoso