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

Revisions saved on blur even when there's no content #2385

Closed
afercia opened this issue Aug 12, 2017 · 3 comments
Closed

Revisions saved on blur even when there's no content #2385

afercia opened this issue Aug 12, 2017 · 3 comments
Labels
[Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Aug 12, 2017

To reproduce:

  • go in the Gutenberg "New Post" page
  • click on the title then use the keyboard and tab a few times to tab in and then away from the Paragraph block
  • wait a few seconds
  • a revision gets saved and "1 Revision" appears on the sidebar

The same happens when clicking inside the paragraph and then outside without entering any content.

I haven't added any content, but there's a Revision now. I realize content is sent to TinyMCE on blur and Gutenberg adds its own delimiter comments (plus an empty paragraph added by TinyMCE?) but I guess this is not the intended behavior. Inspecting the Revisions screens, here's what gets saved:

screen shot 2017-08-12 at 11 22 43

  • repeat the above steps and wait for the first Revision to get saved
  • add a new Paragraph and don't enter any content
  • click outside of the Paragraph
  • wait a few seconds
  • a second Revision gets saved, the sidebar now displays "2 Revisions"

Inspecting the second revision content, here's what gets saved:

screen shot 2017-08-12 at 11 38 12

(Note: it's also wrong because the new content it the second paragraph)

I'd consider to find a way to don't save revisions when there's no actual content entered, to avoid saving a huge amount of revisions in the DB.

@afercia afercia added the [Type] Bug An existing feature does not function as intended label Aug 12, 2017
@adamsilverstein
Copy link
Member

This should be addressed by #4156

@karmatosed
Copy link
Member

Closing this as should have been addressed, we can always reopen if not.

@adamsilverstein
Copy link
Member

Fine to close, however wanted to note that this is currently being tracked in #4218 and is not yet resolved in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants