diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/commands/commands.js b/addons/web_editor/static/src/js/editor/odoo-editor/src/commands/commands.js index 1f0fffc1814..e757deee2ee 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/commands/commands.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/commands/commands.js @@ -377,7 +377,7 @@ export const editorCommands = { const changedElements = []; const defaultDirection = editor.options.direction; const shouldApplyStyle = !isSelectionFormat(editor.editable, 'switchDirection'); - for (const block of new Set(selectedTextNodes.map(textNode => closestBlock(textNode)))) { + for (const block of new Set(selectedTextNodes.map(textNode => closestElement(textNode, 'ul,ol') || closestBlock(textNode)))) { if (!shouldApplyStyle) { block.removeAttribute('dir'); } else { diff --git a/addons/web_editor/static/src/scss/web_editor.common.scss b/addons/web_editor/static/src/scss/web_editor.common.scss index 3b523ccb920..b8c1ee47265 100644 --- a/addons/web_editor/static/src/scss/web_editor.common.scss +++ b/addons/web_editor/static/src/scss/web_editor.common.scss @@ -143,6 +143,7 @@ ul.o_checklist { list-style: none; position: relative; margin-left: $o-checklist-margin-left; + margin-right: $o-checklist-margin-left; &:not(.oe-nested)::before { content: ''; @@ -169,6 +170,11 @@ ul.o_checklist { } } } +ul.o_checklist[dir="rtl"] > li:not(.oe-nested)::before { + left: auto; + right: - $o-checklist-margin-left; + text-align: right; +} ol > li.o_indent, ul > li.o_indent { margin-left: 0; list-style: none;