summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/wysiwyg/plugin
diff options
context:
space:
mode:
authorAntoine Guenet <age@odoo.com>2019-04-16 12:05:28 +0000
committerAntoine Guenet <age@odoo.com>2019-04-25 10:03:14 +0000
commit27eb8ba61798e7bc65bb75becc3f89c839a61996 (patch)
tree1c8a2f95e4a51309cb0e0f012d41858e99145222 /addons/web_editor/static/src/js/wysiwyg/plugin
parentcb9263a8233894459e2238711d1633c1b7995de9 (diff)
[FIX] web_editor, website: never indent/outdent list groups
The "comparisons" website snippet uses a list group with the class set on a UL. In consequence, the web editor considers it as a regular list and may try to outdent it, which is not the expected behavior with a list group. This fix ensures that ULs with the `list-group` class cannot be in/outdented. closes odoo/odoo#32709 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Diffstat (limited to 'addons/web_editor/static/src/js/wysiwyg/plugin')
-rw-r--r--addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js4
1 files changed, 4 insertions, 0 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 59dbdd2c477..dc2a444384b 100644
--- a/addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js
+++ b/addons/web_editor/static/src/js/wysiwyg/plugin/bullet.js
@@ -313,6 +313,10 @@ var BulletPlugin = AbstractPlugin.extend({
if (!range) {
return;
}
+ // list groups shouldn't be outdented like regular lists
+ if ($(dom.ancestor(range.sc, dom.isList)).hasClass('list-group')) {
+ return;
+ }
var self = this;
var nodes = [];