ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.79k stars 2.48k forks source link

CKEditor 4 Drag and Drop Chrome bug cursor jumps to the end of the line #1935

Open aleixfabra opened 6 years ago

aleixfabra commented 6 years ago

In the offical CKEditor Drag and Drop Integration demo (https://sdk.ckeditor.com/samples/draganddrop.html), the cursor jumps sometimes to the end of the line.

It happends with Chrome, but not with Firefox.

I read a lot of things related with this issue but I couldn't find anything clear.

You can see this behavior here:

h8jal

You can also test it here: https://sdk.ckeditor.com/samples/draganddrop.html

Has anyone fixed it or found any solution?

OSX 10.12.6 Chrome 66.0.3359.139 (Build oficial) (64 bits)

Thanks!

jacekbogdanski commented 6 years ago

Hello,

I'm not able to reproduce your issue using Chrome on Linux (65.0.3325.181 64-bit) and Windows 10 machines (66.0.3359.139 64-bit). Please, provide more information about your OS and Chrome versions.

I tried to reproduce what I see on enclosed gif:

  1. Click at the end of dnd element.
  2. Click inside above paragraph area.

As I understand it should be already bugged and selection occurs misplaced. Could you correct me if I'm wrong and also give us more precise reproduction steps?

aleixfabra commented 6 years ago

Hi @jacekbogdanski! I updated the issue with this information! Thank you!

jacekbogdanski commented 6 years ago

I'm still not able to reproduce the issue using OSX. Please give us precise reproduction steps because with the steps already written by me I cannot get your results. Also @msamsel, @engineering-this could you try to reproduce the issue? Maybe I'm missing something and you will be able to catch it up.

aleixfabra commented 6 years ago

Hi @jacekbogdanski!

To reproduce the issue:

  1. Enter to https://sdk.ckeditor.com/samples/draganddrop.html
  2. Put the cursor on the right side of the point element
  3. Delete the point with the backspace key
  4. The cursor will jump automatically to the end of the line
jacekbogdanski commented 6 years ago

Thank you for reproduction steps. I was able to reproduce the issue. Although the issue exists only as a visual problem because a caret is still placed in correct position. You can remove the dot and type it again - it will work correctly. It looks more like upstream Chrome issue but I can be wrong. Nevertheless, it requires some additional research.

aleixfabra commented 6 years ago

@jacekbogdanski if you comment these lines, the problem disappears:

/*upcast: function( el ) {
    return el.name == 'span' && el.hasClass( 'field' );
}*/

So, why the upcast() make this?