summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorAntoine Guenet <age@odoo.com>2019-02-26 13:48:00 +0000
committerAdrien Dieudonne <adr@odoo.com>2019-05-22 11:55:23 +0000
commite2ca200046850bb0a465b821b65fe59a8f4c2667 (patch)
treee48837fd4c35acfca7d9bb7f2a38c7312df5881a /addons/web_editor/static/src/js
parent3c3a3de3f1ea451bf9073759eba376a8685e7123 (diff)
[FIX] web_editor: remove o_checklist class on convert to ordered list
Converting a checklist into an ordered list didn't remove the o_checklist class. In consequence, converting a checklist to an ordered list and then to an unordered list failed as the unordered list with the o_checklist class is effectively a checklist. This fixes that bug. closes odoo/odoo#31432 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js b/addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js
index dc2a444384b..d134bf7c5e5 100644
--- a/addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js
+++ b/addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js
@@ -165,10 +165,10 @@ var BulletPlugin = AbstractPlugin.extend({
// convert ul <-> ol
var ul;
+ $(ol).removeClass('o_checklist');
if (sorted === 'checklist' && current === "ul") {
ul = ol;
} else if (sorted === 'ul' && current === 'checklist') {
- $(ol).removeClass('o_checklist');
ul = ol;
} else {
ul = this.document.createElement(sorted === "ol" ? "ol" : "ul");