editor-js / paragraph

Paragraph Tool for Editor.js 2.0
MIT License
46 stars 127 forks source link

Hydrate function messes caret when merging paragraphs #73

Closed yankaled closed 8 months ago

yankaled commented 1 year ago

The Hydrate function from commit 103d75b causes a bug when merging blocks. Say that you have Paragraph_1 and Paragraph_2 (different blocks). When you press back on the beginning of Paragraph_2, the new state should be

Paragraph_1 [caret] Paragraph_2

But with the hydrate function the state we get is:

[caret] Paragraph_1 Paragraph_2

neSpecc commented 1 year ago

Can't reproduce. What is your editor.js version?

https://github.com/editor-js/paragraph/assets/3684889/93eef25b-081d-4708-8fe8-5d40b0a3ace0