Skip to content
Snippets Groups Projects
Commit f41c3e4a authored by Antoine Guenet's avatar Antoine Guenet
Browse files

[FIX] web_editor: unformat only if full selection is bold

Take `<p>a<b>bcde</b>f` and select the whole paragraph. If you click the
"bold" button, you would expect the whole paragraph to become bold. Only
if you only select "bcde" do you expect to unbold it. This is the
behavior of other editors. Odoo-editor so far was unbolding as long as a
part of the selection was bold.
The same applies to other formats.

Currently the format buttons are active when the closest start container
is that format but it should be active when pressing it would undo the
format, ie when the whole selection is that format. This harmonizes it
with the browser defaults.

task-2754127

X-original-commit: 69c5db26f81ace1a9a032b2ef7f488c997be00ad
Part-of: odoo/odoo#86930
parent 18ca8b44
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment