odoo/odoo#207560

Created by fw-bot
Merged at a797439333652b2becb3653592fcaff0f02913a9

Statuses:

label
odoo-dev:saas-18.1-18.0-remove-empty-format-adsa-411638-fw
head
343c5fc0a0cd432fce107050d96501aa58b8cbe0
merged
5 months ago by Editor, David Monjoie (dmo)
odoo/odoo
18.0 #195018
saas-18.1 #207560
saas-18.2 #207599
saas-18.3 #207612
saas-18.4
19.0
master #209528

[FW][FIX] html_editor: remove empty format tags

Behavior before this PR:

  • Create a bold or italic tag using keyboard when selection is collapsed, leave it empty.
  • Change selection using arrow key.
  • Put cursor back where format tag was created.

Notice that empty element is not removed and text is formatted when writing something.

Behavior after PR is merged:

  • This PR makes sure that empty format element gets removed when changing selection.
  • Tag will not get removed if it's parent block element is empty.

task-4240818


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

Forward-Port-Of: #195018