From 5992fac7aadace09baeea497f0967e7c7dfcc519 Mon Sep 17 00:00:00 2001 From: Lucas Perais Date: Thu, 29 Sep 2022 19:21:06 +0000 Subject: [PATCH] [FIX] web_tour: drag_and_drop_native: pass position to mousemove Before this commit, the positions of the virtual pointer were not passed to the mousemove event, preventing draggable code to correctly work. After this commit, the Event is a proper MouseEvent, with clientX and clientY set correctly. X-original-commit: 2e60d1b733fd73021fb1dea490e6fa3ba2fc31d0 Part-of: odoo/odoo#102153 --- addons/web_tour/static/src/js/running_tour_action_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_tour/static/src/js/running_tour_action_helper.js b/addons/web_tour/static/src/js/running_tour_action_helper.js index 947ec91f071..4a8024ed2d9 100644 --- a/addons/web_tour/static/src/js/running_tour_action_helper.js +++ b/addons/web_tour/static/src/js/running_tour_action_helper.js @@ -171,7 +171,7 @@ var RunningTourActionHelper = core.Class.extend({ clientX: elementCenter.left, clientY: elementCenter.top, })); - element.dispatchEvent(new Event("mousemove", { bubbles: true, cancelable: true })); + element.dispatchEvent(new MouseEvent("mousemove", { bubbles: true, cancelable: true, clientX: toCenter.left, clientY: toCenter.top})); to.dispatchEvent(new Event("mouseenter", { clientX: toCenter.left, clientY: toCenter.top })); element.dispatchEvent(new Event("mouseup", { bubbles: true,