AztecEditor-Android icon indicating copy to clipboard operation
AztecEditor-Android copied to clipboard

Local changes detected after `undo`

Open designsimply opened this issue 5 years ago • 4 comments

Moved from https://github.com/wordpress-mobile/WordPress-Android/issues/8009. h/t @mzorz

Expected behavior

If content remains identical to what the Editor was fed with, it should not show the Local changes label when adding content then undoing.

Actual behavior

Opening an existing post, adding a character then tapping on undo still makes the app believe there were changes made to the content.

Steps to reproduce the behavior

  1. Open existing post (make sure it's not a post with local changes at this point)
  2. Type a character
  3. Press Undo
  4. Press back and observe "Local Changes" label on the post list
Tested on [Google Pixel], Android [8.1]

designsimply avatar Feb 23 '20 00:02 designsimply

Moved from https://github.com/wordpress-mobile/WordPress-Android/issues/8009#issuecomment-430309781. h/t @rachelmcr

In my testing, the issue here is that the "undo" action wasn't saved.

When I follow those steps to reproduce the issue, and then open the post again, I can see the changes that I made to the post even though those changes were removed with the "undo" button previously. (This also happens if I type a character and backspace to remove it; the character I added is saved locally.)

designsimply avatar Feb 23 '20 00:02 designsimply

Tested and confirmed using 14.2-rc-2 on pixel 3 Android 10. (1m54s)

designsimply avatar Feb 23 '20 00:02 designsimply

Is this only happening in the Classic Editor or in mobile Gutenberg too?

hypest avatar Feb 25 '20 10:02 hypest

Good question. I just did a quick test and it's happening in Gutenberg Mobile too. I'll do a bit more testing and create an additional issue in the gutenberg-mobile repo.

designsimply avatar Feb 25 '20 14:02 designsimply