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

Multiple html code-block bug fixes #503

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cain
Copy link
Contributor

@cain cain commented Jul 25, 2018

Problems:

  1. HTML editor blocks are being duplicated on edit, and once republished are then visible. (see gif below)

kapture 2018-07-26 at 9 25 35

  1. Converting code blocks to html sometimes duplicates the containing div. See https://github.com/Automattic/liveblog/pull/503/files#diff-9e8481d2ea9020bcf8e803df71a6ca3bR22 for the problem.

Solutions:

  1. Remove the inner HTML of the HTML block once the entity is created (see diff). I also had to create an eslint rule to prevent eslint from yelling at us.

  2. In React v16.2.0 you can now use react.fragment to not render containing divs for inner html. See https://stackoverflow.com/a/44033054 for the solution.

@cain cain changed the title html duplication bugfix Multiple html code-block bug fixes Jul 26, 2018
@philipjohn philipjohn added this to the 1.9.1 milestone Oct 8, 2018
@philipjohn philipjohn modified the milestones: 1.9.1, 1.9.2 Oct 16, 2018
@philipjohn philipjohn removed this from the 1.9.2 milestone Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants