-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undo/redo: cursor positioning on Rich Text-based blocks after undoing is pos+1 #303
Comments
OK, this got worse. Instead of the cursor moving, the whole text disappears |
Confirmed as well on iOS. The text isn't deleted every time, sometimes I see the cursor thing only |
While investigating this problem found out that we're only storing the content of the block in history, then when the user taps on the undo/redo buttons the content of the block is changed but the caret position is not updated. |
This may not be directly related since I'm only seeing this on Android, but I see that an extra undo point to move the cursor is getting created on Android when adding words to a paragraph block. Steps to Reproduce
|
I was able to reproduce this one on a recent version ( |
Moved from High prio to Medium, I wasn't able to reproduce the content loss (like in #303 (comment)) |
Some improvements were made to undo/redo in 15.6. See WordPress/gutenberg#24116. Props @dratwas. 🎉 During beta testing for 15.6, I found that the cursor still moves around unexpectedly as described in this issue. I also didn't experience any content loss as maxme also mentioned above. 👍 In my case, when adding a few sentences to the beginning of a paragraph block then removing them with undo, the cursor always seemed to land one character short of where I think it should be landing (pos-1 instead of pos+1). Tested with WPiOS 15.6.0.1 TestFlight beta on iPhone 11 iOS 13.6.1. When I tried the original steps for this issue, I found that the cursor landed at the end of the most recently added text when I added a space to the middle of a word then tapped undo. Tested with WPiOS 15.6.0.1 TestFlight beta on iPhone 11 iOS 13.6.1. When I tried the steps from mchowning's comment, I found that it only took two undos to remove the two words added but the cursor jumps to the beginning of the text after the first undo which is unexpected. Tested with WPiOS 15.6.0.1 TestFlight beta on iPhone 11 iOS 13.6.1. |
This ticket is not worked on at the moment so, I'll clear the assignee field to denote so. |
This is still reproducible but there's a debounce of 1 second. The steps are:
ResultTested with GutenbergDemo app 1.40.0 iPhone 11 simulator on iOS 14 ActionState DiffThe |
FYI: Still an issue as of screencapture-1626125491626.mp4 |
Noting that this can still be replicated, most recently tested on an iPhone XR with the pr18445-7dc96cb build. |
The text was updated successfully, but these errors were encountered: