GUACAMOLE-2257: Clone mouse state object to reflect the state at the time of the event.

This commit is contained in:
Corentin SORIANO authored and adam committed 2026-04-20 13:45:20 +01:00
1 parent 76979644d4
commit 48174ade62
1 file changed
+3 -1
@@ -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