From a4335529c1ca654345c12ee1dd58ea1d86d6982f Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Wed, 18 Jan 2023 16:20:16 +0000 Subject: [PATCH] [FIX] web_editor: remove horizontal sizing options on mobile In this commit, the horizontal sizing options are disabled from the snippets overlay on mobile view as they were ineffective and unnecessary. task-2978500 closes odoo/odoo#113945 X-original-commit: b7359e47ce3888433a31592a365017c1183242a7 Signed-off-by: loco-odoo --- addons/web_editor/static/src/js/editor/snippets.options.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 34c4fe91548..fd92343e147 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -4597,7 +4597,8 @@ registry.sizing = SnippetOptionWidget.extend({ const isGridHandle = handleEl.classList.contains('o_grid_handle'); handleEl.classList.toggle('d-none', isGrid ^ isGridHandle); // Disabling the resize if we are in mobile view. - handleEl.classList.toggle('readonly', isMobileView && isGridHandle); + const isHorizontalSizing = handleEl.matches('.e, .w'); + handleEl.classList.toggle('readonly', isMobileView && (isHorizontalSizing || isGridHandle)); } // Hiding the move handle in mobile view so we can't drag the