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

Fix editor when formatting starts with a linebreak #7999

Merged
merged 3 commits into from May 11, 2021

Conversation

lahdeero
Copy link
Contributor

@lahdeero lahdeero commented May 11, 2021

🎩 What? Why?

Currently editor crashes when formatting start with a linebreak, for example
<strong><br>foo</strong>, or <em><br>bar</em>. This pull request fixes this and adds test.

📌 Related Issues

#7896 @alecslupu 's comment
quilljs/parchment#87

Testing

  1. In console:
Decidim::Organization.first.update(admin_terms_of_use_body: { "en" => "<p>something</p><h1><br
></h1><p><strong><br></strong></p><p><u><br></u></p><p><em><br></em></p>" })
  1. Go to: admin/organization/edit
  2. Editor content is editable

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

♥️ Thank you!

@mrcasals mrcasals changed the title Fix/editor mutations of undefined Fix editor when formatting starts with a linebreak May 11, 2021
@mrcasals mrcasals merged commit d7e66dc into decidim:develop May 11, 2021
@mrcasals mrcasals added module: core type: fix PRs that implement a fix for a bug labels May 11, 2021
@mrcasals
Copy link
Contributor

Thanks, @lahdeero, for taking care of these issues! ❤️

@ahukkanen ahukkanen deleted the fix/editor_mutations_of_undefined branch May 11, 2021 15:16
entantoencuanto added a commit that referenced this pull request May 12, 2021
…ions

* develop: (23 commits)
  New Crowdin updates (#8001)
  Fix editor when formatting starts with a linebreak (#7999)
  Polling station officer ballot count (#7823)
  New Crowdin updates (#7995)
  Election log (#7923)
  New Crowdin updates (#7988)
  Fixing failing tests on develop branch (#7991)
  Add notes to changelog (#7987)
  Add 2 additional queues for a better scalling of the application (#7986)
  Add announcements to assemblies (#7971)
  Display meetings count in directory page (#7972)
  Touch the reportable object when is hidden to reset caches (#7966)
  Hide moderated meetings and proposals from admin lists (#7974)
  Hide moderated proposals from comparator (#7975)
  Add comment count to the proposal cache (#7965)
  Simplify SQL query for endorsement stats (#7973)
  Show confirmation modal when leaving a meeting (#7970)
  Fix: #7889 - Each comment in a meeting generates a new version of the meeting (#7978)
  Add cache layer for ActivityCell boxes (#7967)
  New Crowdin updates (#7980)
  ...
@lahdeero lahdeero mentioned this pull request May 18, 2021
12 tasks
leio10 pushed a commit that referenced this pull request May 25, 2021
* Cherry pick and fix merge conflict

* Delete duplicate

* Remove unnecessary semicolon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: core type: fix PRs that implement a fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants