[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 <loco@odoo.com>
This commit is contained in:
Benjamin Vray
2023-03-02 09:11:18 +01:00
parent d72511cc4c
commit a4335529c1
@@ -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