GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.21k stars 416 forks source link

[Bug]: Unexpected results with undo in block editor. #1216

Open SnowB0und14 opened 1 year ago

SnowB0und14 commented 1 year ago

Operating system

macOS Ventura 13.2.1

Publii version

0.42.1

Post editor

Block editor

Bug description

When using undo (command z) block editor reacts unexpectedly. I pasted something, and then hit undo and it deleted some content and duplicated what was left, hit command z again and it tripled.

Steps to reproduce

Type something into a paragraph section, paste some other text into it, press (command z). Press (command z) again and it should double or triple what was in the text box.

Relevant log output

No response

swanhtet1992 commented 1 year ago

I also faced this bug. For me it was not just undo. Simply deleting a text from a block also created unexpected behavior. For example, if you select a piece of text within a block and hit the delete button, the whole block merged with the block above. And if you hit undo in that merged block, everything that you have written below disappeared. You cannot get those back again.