From 48174ade6298a55611e16842f7fb6130b4df28ab Mon Sep 17 00:00:00 2001 From: Corentin SORIANO Date: Mon, 13 Apr 2026 15:17:30 +0200 Subject: [PATCH] GUACAMOLE-2257: Clone mouse state object to reflect the state at the time of the event. --- guacamole-common-js/src/main/webapp/modules/Mouse.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guacamole-common-js/src/main/webapp/modules/Mouse.js b/guacamole-common-js/src/main/webapp/modules/Mouse.js index 379458b0b..6aaf77fe0 100644 --- a/guacamole-common-js/src/main/webapp/modules/Mouse.js +++ b/guacamole-common-js/src/main/webapp/modules/Mouse.js @@ -546,10 +546,12 @@ Guacamole.Mouse.Event = function MouseEvent(type, state, events) { /** * The current mouse state at the time this event was fired. + * The state object is cloned so as not to be affected by subsequent events + * that will have their own dedicated Guacamole.Mouse.Event instance. * * @type {!Guacamole.Mouse.State} */ - this.state = state; + this.state = { ...state }; /** * @inheritdoc