diff --git a/web/package-lock.json b/web/package-lock.json index 8ba596075..c7f87fa9d 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -74,7 +74,7 @@ "@types/chart.js": "^2.9.41", "@types/codemirror": "5.60.15", "@types/grecaptcha": "^3.0.7", - "@types/guacamole-common-js": "1.3.2", + "@types/guacamole-common-js": "1.5.2", "@typescript-eslint/eslint-plugin": "^6.16.0", "@typescript-eslint/parser": "^6.16.0", "babel-plugin-macros": "^3.1.0", @@ -7370,9 +7370,9 @@ "dev": true }, "node_modules/@types/guacamole-common-js": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/guacamole-common-js/-/guacamole-common-js-1.3.2.tgz", - "integrity": "sha512-217AvsdGfuoqrXLWjrZOjO1CRzY0PNCG07NQf+cW6gYZhExCpjwDrpIbi5pFrmskPZB3T8n1CZLEoYW7rTERNQ==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/guacamole-common-js/-/guacamole-common-js-1.5.2.tgz", + "integrity": "sha512-S01txydRyBscHyV8giYNdrfU7dzwUkLb8prQPP68/YCpY/gMtcL9e7BXGpQttj4XpelSUVkA++TjllalZ0AHjg==", "dev": true }, "node_modules/@types/http-errors": { diff --git a/web/package.json b/web/package.json index ed7681155..e7fe1cb19 100644 --- a/web/package.json +++ b/web/package.json @@ -98,7 +98,7 @@ "@types/chart.js": "^2.9.41", "@types/codemirror": "5.60.15", "@types/grecaptcha": "^3.0.7", - "@types/guacamole-common-js": "1.3.2", + "@types/guacamole-common-js": "1.5.2", "@typescript-eslint/eslint-plugin": "^6.16.0", "@typescript-eslint/parser": "^6.16.0", "babel-plugin-macros": "^3.1.0", diff --git a/web/src/enterprise/rac/index.ts b/web/src/enterprise/rac/index.ts index 495e09801..272ba2211 100644 --- a/web/src/enterprise/rac/index.ts +++ b/web/src/enterprise/rac/index.ts @@ -238,13 +238,15 @@ export class RacInterface extends Interface { this.client.sendMouseState(mouseState); }; - mouse.onmouseup = mouse.onmousedown = (mouseState) => { + // @ts-ignore + mouse.onEach(["mouseup", "mousedown"], (ev: Guacamole.Mouse.Event) => { this.container?.focus(); - handler(mouseState); - }; - mouse.onmousemove = (mouseState) => { - handler(mouseState, true); - }; + handler(ev.state); + }); + // @ts-ignore + mouse.on("mousemove", (ev: Guacamole.Mouse.Event) => { + handler(ev.state, true); + }); } initAudioInput(): void { @@ -298,7 +300,7 @@ export class RacInterface extends Interface { if (!this.client) { return; } - const stream = this.client.createClipboardStream("text/plain", "clipboard"); + const stream = this.client.createClipboardStream("text/plain"); const writer = new Guacamole.StringWriter(stream); writer.sendText(value); writer.sendEnd();