diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 97118ceabef..4d1b3ecd259 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -5311,9 +5311,6 @@ registry.layout_column = SnippetOptionWidget.extend({ } // Removing the grid properties. delete rowEl.dataset.rowCount; - - // Adding back an align-items-* class. - rowEl.classList.add('align-items-start'); }, /** * Removes the padding highlights that were added when changing the grid @@ -5329,6 +5326,22 @@ registry.layout_column = SnippetOptionWidget.extend({ }, }); +registry.vAlignment = SnippetOptionWidget.extend({ + /** + * @override + */ + async _computeWidgetState(methodName, params) { + const value = await this._super(...arguments); + if (methodName === 'selectClass' && !value) { + // If there is no `align-items-` class on the row, then the `align- + // items-stretch` class is selected, because the behaviors are + // equivalent in both situations. + return 'align-items-stretch'; + } + return value; + }, +}); + /** * Allows snippets to be moved before the preceding element or after the following. */