From b0d58f18c16840f3f752f4b3876a5a674a2e4c42 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Wed, 14 Oct 2020 11:58:57 +0000 Subject: [PATCH] [FIX] web_editor: fix mouse up event on active handles Before this commit, the mouseup event was not detected outside the body element when resizing paddings. task-2312878 closes odoo/odoo#60380 X-original-commit: 2766eee14341a2475bc1c33a032ea05b50becc29 Signed-off-by: Quentin Smetz (qsm) --- addons/web_editor/static/src/js/editor/snippets.options.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 148b41ca6c2..987d6fe964c 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -2982,7 +2982,7 @@ registry.sizing = SnippetOptionWidget.extend({ }; var bodyMouseUp = async function () { $body.off('mousemove', bodyMouseMove); - $body.off('mouseup', bodyMouseUp); + $(window).off('mouseup', bodyMouseUp); $body.removeClass(cursor); $handle.removeClass('o_active'); @@ -2999,7 +2999,7 @@ registry.sizing = SnippetOptionWidget.extend({ } }; $body.on('mousemove', bodyMouseMove); - $body.on('mouseup', bodyMouseUp); + $(window).on('mouseup', bodyMouseUp); }); return def;