Skip to content

Conversation

@adryd325
Copy link

@adryd325 adryd325 commented Jan 9, 2026

Description

Currently the VncScreen component has hardcoded onMouseEnter and onMouseLeave events to focus and blur the noVNC rfb. This change allows customization of what happens with those events.

In the case of our project, the blurring on mouse leave is unnecessary and causes missed key-up events if a key is held when the mouse leaves the VncScreen component. Developers can customize behaviour by setting onChildMouseEnter and onChildMouseLeave as props on the VncScreen element.

This also modifies the default behavior of onMouseLeave to check if the target (cursor destination) is the noVNC mouse capture element. If the target is the noVNC mouse capture element it doesn't blur the rfb. This addresses the keyboard input issues caused by #5. Thanks to @richardstephens for the initial workaround which I cherry-picked into this branch.

richardstephens and others added 2 commits January 9, 2026 16:20
… events

Currently the VncScreen component has hardcoded onMouseEnter and onMouseLeave events to focus and
blur the noVNC rfb. This change allows customization of what happens with those events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants