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

Hash links don't update config #1596

Open
half-duplex opened this issue Oct 22, 2021 · 1 comment
Open

Hash links don't update config #1596

half-duplex opened this issue Oct 22, 2021 · 1 comment
Labels

Comments

@half-duplex
Copy link

half-duplex commented Oct 22, 2021

Describe the bug
Changes in the URL hash don't propagate to the config, instead requiring a page reload to become active.

To Reproduce
Steps to reproduce the behavior:

  1. Browse to vnc.html without get variables or hash
  2. Add #path=/other-websockify to URL
  3. Open devtools network inspector
  4. Click "Connect"
  5. See noVNC attempt to connect to /websockify despite the change

Expected behavior
The hash change event was hooked and the config updated, so the application connects to /other-websockify

Client:

  • OS: Linux (Manjaro)
  • Browser: Chromium
  • Browser version: 94.0.4606.81

Server:

  • noVNC version: 1.20
  • VNC server: VMware Workstation
  • WebSocket proxy: websockify 0.10.0

Additional context
In addition to manual updates, this affects updates done by clicking links added to vnc.html, e.g. <a href="#path=/other-ws">...</a>
I worked around this by adding the following line to addSettingsHandlers() in app/ui.js:
window.addEventListener("hashchange", UI.initSettings, false);

@CendioOssman
Copy link
Member

This is unfortunately non-trivial as we have to know which parts of the hash that the user actually cares about. We don't want to blindly overwrite settings the user has manually changed in the UI.

I'll leave this open though if someone wants to attempt a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants