Wysiwyg-editor: Cursor in the wrong place after image insert/upload

Created on 13 Apr 2020  路  4Comments  路  Source: froala/wysiwyg-editor

Expected behavior.

When I insert an image
And i click somewhere else in the content
The cursor should be where I click
When I press any key
The cursor should stay where it is placed and perform the correct action there

Actual behavior.

When I insert an image
and I click somewhere else in the content (somewhere else in the content, say in a paragraph)
The cursor moves to this position
when I then perform an action (for example) pressing the backspace key
the cursor returns to the inserted image and deletes it

Steps to reproduce the problem.

see above
https://jsfiddle.net/7bfhq6to/

Editor version.

v3.1

OS.

Mac os Catalina

Browser.

Google Chrome
Version 80.0.3987.163 (Official Build) (64-bit)

Recording.

https://streamable.com/aww3wz

Most helpful comment

@JakobMm @jdanino Hi guys. We are aware of issues with the image selection in 3.1.0 and 3.1.1.
The fix is scheduled for the next Froala version (3.2).

All 4 comments

I ran into this issue myself. A more serious consequence for our use case is that after you paste the image and move the cursor anywhere else, you cannot type any text until you click around a few more times.

This is reproducible in the above fiddle as well as the editor on froala website.

Update:
@codeRulc found that after you paste the image and click away the issue is resolved if you press either left or right arrow key. Hopefully this helps you identify the issue faster.

In the meantime I implemented a dirty workaround, where we trigger a fake keydown and keyup event for a right arrow key onclick after image is pasted

@JakobMm @jdanino Hi guys. We are aware of issues with the image selection in 3.1.0 and 3.1.1.
The fix is scheduled for the next Froala version (3.2).

Same bug here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

horatiua picture horatiua  路  4Comments

archonic picture archonic  路  4Comments

isubasti picture isubasti  路  4Comments

Krisell picture Krisell  路  3Comments

jmsche picture jmsche  路  3Comments