Skip to content
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

Aztec could change the content of a block even if no changes are actually made to it, and a new History point is added to the Stack #894

Open
daniloercoli opened this issue Apr 19, 2019 · 0 comments

Comments

@daniloercoli
Copy link
Contributor

Aztec may slightly change the HTML content passed in input (see HTML tags) and may produce a different version of the HTML code when passed back to JS, resulting in a new History point made in the store.

Original Content
<em>Gutenberg is available as a plugin today, and will be included in version 5.0 of WordPress. The <a href="https://wordpress.org/plugins/classic-editor/">classic editor</a> will be available as a plugin if needed.</em>

Modified content returned to JS
'<em>Gutenberg is available as a plugin today, and will be included in version 5.0 of WordPress. The <a href="https://wordpress.org/plugins/classic-editor/">classic editor</a></em><em> will be available as a plugin if needed.</em>',

The new history point will affect the writing flow, since the user needs to tap twice on the undo button to restore the original state, and go back to a clean history.
It's not a big problem, since those 2 HTML documents, are semantically equals, but the Undo button enabled/available makes the user think that there are changes still need to be undone.

It was originally reported in this PR here: #892 (see the end of the description), and in this comment here: #892 (comment)

Steps to repro:

  • Start the demo app
  • Tap on a RichText block that does contain styled text
  • Tap on enter
  • A new para block is created
  • You need to tap Undo twice to restore to a clean History
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant