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] web_editor: stop removing empty block after deleting its contents #31277

Closed
wants to merge 3 commits into
base: saas-12.2
from

Conversation

Projects
None yet
4 participants
@Zinston
Copy link

Zinston commented Feb 20, 2019

Deleting all the contents of a block node replaced it with a blank
paragraph node. To restore v12 behavior, it should only do that when
pressing backspace in an already empty block, which is now what it does.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo robodoo added the seen 🙂 label Feb 20, 2019

@Zinston Zinston changed the title Saas 12.2 summernote unformatempty age [FIX] web_editor: stop removing empty block after deleting its contents Feb 20, 2019

@Zinston Zinston requested a review from pparidans Feb 20, 2019

@C3POdoo C3POdoo added the RD label Feb 20, 2019

@robodoo robodoo added the CI 🤖 label Feb 20, 2019

Show resolved Hide resolved addons/web_editor/static/src/js/wysiwyg/plugin/keyboard.js Outdated

Zinston added some commits Feb 19, 2019

[FIX] web_editor: stop removing empty block after deleting its contents
Deleting all the contents of a block node replaced it with a blank
paragraph node. To restore v12 behavior, it should only do that when
pressing backspace in an already empty block, which is now what it does.
[FIX] web_editor: remove broken and unnecessary test
The next test was identical to the removed one, with the exception that
it inserts a character at the end, which really is the behavior we want
to test. The removed test was broken because it expected the range on
the parent, which is anyway equivalent in this case. This is confirmed
by the fact that inserting a character at either ranges indeed inserts
the character where it is expected to do so.
[IMP] web_editor: add tests for deleting all contents of format block
Implementing new behavior on delete all contents of a format block
revealed insufficient testing, which is now covered.

@Zinston Zinston force-pushed the odoo-dev:saas-12.2-summernote-unformatempty-age branch to 493278b Feb 21, 2019

@robodoo robodoo removed the CI 🤖 label Feb 21, 2019

@pparidans

This comment has been minimized.

Copy link
Contributor

pparidans commented Feb 21, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 21, 2019

Because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward
@pparidans

This comment has been minimized.

Copy link
Contributor

pparidans commented Feb 21, 2019

@robodoo rebase-ff

robodoo pushed a commit that referenced this pull request Feb 21, 2019

[IMP] web_editor: add tests for deleting all contents of format block
Implementing new behavior on delete all contents of a format block
revealed insufficient testing, which is now covered.

closes #31277
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 21, 2019

Merge method set to rebase and fast-forward

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 21, 2019

Merged, thanks!

@robodoo robodoo closed this Feb 21, 2019

@pparidans pparidans deleted the odoo-dev:saas-12.2-summernote-unformatempty-age branch Feb 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.