GUACAMOLE-2257: Clone mouse state object to reflect the state at the time of the event.
This commit is contained in:
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 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}
|
* @type {!Guacamole.Mouse.State}
|
||||||
*/
|
*/
|
||||||
this.state = state;
|
this.state = { ...state };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
|
|||||||
Reference in new issue
Block a user