I am not sure whether this is a bug or maybe a limitation but considering the upload handling example, the editor cursor cannot be moved before the character next to the widget decoration that temporarily replaces the image node:
Here are the steps for reproduction:
- Open the upload handling example: https://prosemirror.net/examples/upload/
- In the sample editor, move the cursor after the letter “g” of the word “paragraph”.
- Click on the button “Choose File” and select an image.
- While the placeholder image is present (i.e. not yet replaced by the final image), move the cursor to one character to the right with the keyboard right arrow key.
At this stage, you will notice the cursor moves after the letter “r”. I was expecting the cursor to move before the letter “r”. If you try to move the cursor to the left, you will see the cursor moves directly to the left side of the placeholder and it is not possible to get the cursor positioned between the right side of the placeholder and the letter “r”.
The issue is present with the image placeholder only. Once the placeholder is replaced by the final image, the cursor moves as expected. Is this a bug with widget decorations? how to get the cursor move as expected?
Other than this issue, is it normal that the widget decoration cannot be moved (dragged and dropped) as for the final image node it temporarily replaces?