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 = []; diff --git a/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js b/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js index 86a7c716cc6..e59f8d14539 100644 --- a/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js +++ b/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js @@ -2227,6 +2227,18 @@ var keyboardTestsComplex = [{ start: "p:contents()[0]->1", }, }, + { + name: "in ul.list-group (div > p > text before): BACKSPACE at start", + content: '

1

', + steps: [{ + start: "p:eq(1)->0", + key: 'BACKSPACE', + }], + test: { + content: '

1

', + start: "p:eq(1)->0", + }, + }, ]; QUnit.test('Complex', function (assert) {