fix(remote-desktop): resolve Firefox stuck right-click via mouse state reconciliation#1297
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a Firefox-specific “stuck right-click” behavior in the web remote desktop client by reconciling mouse button state when re-entering the canvas and releasing inputs when the page loses focus/visibility.
Changes:
- Add mouse button reconciliation on
mouseenterand introducefocusLost()input release inRemoteDesktopService. - Update the Svelte component to release inputs on window blur / tab hidden, and remove the prior
mouseleavebutton-state call. - Add Vitest regression coverage for mouse enter/leave and focus-loss input release behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| web-client/iron-remote-desktop/src/services/remote-desktop.service.ts | Reconciles event.buttons on mouse re-entry and adds focusLost() to release inputs. |
| web-client/iron-remote-desktop/src/services/mouseInput.test.ts | Adds regression tests covering mouse-out, focus-lost, and mouse-in button reconciliation. |
| web-client/iron-remote-desktop/src/iron-remote-desktop.svelte | Hooks blur/visibility events to release inputs and removes the prior mouseleave button-state call. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5d19c84 to
3395d5c
Compare
Marc-André Moreau (mamoreau-devolutions)
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed a Firefox-specific issue where right-clicking inside the remote desktop canvas could leave the server-side right mouse button state stuck as pressed.
Changes
Input cleanup
onmouseleavenow releases all active inputs throughmouseOut()focusLost()handling for:blurvisibilitychangeMouse state reconciliation
Updated
mouseIn()to compare event.buttonsagainst tracked server-side button state.If the browser no longer reports a button as held, the service releases it server-side.
This covers:
Releases are batched into a single
applyInputscall.Listener cleanup
captureKeysso it can be properly removedonDestroynow removes:Tests
Added
mouseInput.test.tscovering:mouseOutfocusLostmouseInreconciliation