Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steal focus in Connect after successfully installing VNet daemon #53290

Open
3 tasks
ravicious opened this issue Mar 21, 2025 · 0 comments
Open
3 tasks

Steal focus in Connect after successfully installing VNet daemon #53290

ravicious opened this issue Mar 21, 2025 · 0 comments

Comments

@ravicious
Copy link
Member

On macOS, clicking on "Connect" next to a TCP app should start VNet and copy the public address of the app to clipboard. That is not the case when the user clicks on the button for the first time.

When VNet is run for the first time, we have to install a background item for the VNet daemon. The user needs to interact with a system notification and then a system auth dialog. During all of this, the Electron app loses focus. So when the button event handler sees that the VNet daemon got installed and tries to copy the app address to the clipboard, it cannot do so because of Chromium's policy for clipboard manipulation which doesn't let the browser APIs modify the clipboard if Chromium window is not focused.

To work around this, we should make sure that the renderer window is focused once the app knows that the daemon got installed.

  • Steal focus after successfully installing VNet daemon.
  • Adjust the notification message for single-port apps so that it says "Connect via VNet by using <address> and any port.
  • Investigate if the same issue exists on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant