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 #31252

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@Zinston
Copy link

Zinston commented Feb 19, 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

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 requested a review from pparidans Feb 19, 2019

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

@C3POdoo C3POdoo added the RD label Feb 19, 2019

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

@Zinston Zinston self-assigned this Feb 20, 2019

@Zinston

This comment has been minimized.

Copy link
Author

Zinston commented Feb 20, 2019

Moved to #31277

@Yenthe666

This comment has been minimized.

Copy link
Contributor

Yenthe666 commented Feb 20, 2019

Closing in favour of #31277 - correct me if I'm wrong :)

@Yenthe666 Yenthe666 closed this Feb 20, 2019

@robodoo robodoo added closed 💔 and removed CI 🤖 labels Feb 20, 2019

@pparidans pparidans deleted the odoo-dev:master-summernote-unformatempty-age branch Feb 20, 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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.