Disable close confirmation dialog
In the latest beta (1.7.0) a new dialog was added to confirm closing the tab, but there is no setting to disable it and restore the old behaviour.
Due to my workflow this dialogue box is very annoying, and I don't understand why it is enabled by default without any option to disable it.
Could you explain your workflow a bit?
I just close/open the tab a lot of times per day. Also, I dont really understand the purpose of this confirmation dialog, normally you present such a dialog when you can loose unsaved changes for example. But when closing the noVNC tab, you loose nothing. And if you closed it by accident, you can just click "Re-open last closed tab" in Chrome.
Imagine that every website tab you close would ask for confirmation, that would be extremely annoying. So why should noVNC be any different?
Imagine that every website tab you close would ask for confirmation, that would be extremely annoying. So why should noVNC be any different?
Well, this was added for the case where users, for example, are accustomed to using Ctrl+w when working in a terminal. And for that reason, they often accidentally close the browser tab when working in a terminal in a noVNC session.
But I think you are raising a valid point here; there could probably be more users like you who interact with sessions in short bursts instead of having a single long-running session tab that would be bothered by this new check.
Could you take a look at allowing this to be toggled?
@CendioZeijlon Do you mean something like #2019
Maybe another solution would be to only show the dialog when the CTRL key is pressed down while the tab unloads. (If that is possible to detect?).
This would prevent the box from showing when closing the tab explicitly with the mouse, but would still show it when pressing CTRL-W. This would fix the issue were people press CTRL-W by accident, while not bothering users who use a mouseclick to close it.
But the solution by @redneck-f25 to make it optional, is even better ofcourse.
Maybe another solution would be to only show the dialog when the CTRL key is pressed down while the tab unloads. (If that is possible to detect?).
The BeforeUnloadEvent does not have a ctrlKey property and handling the state of the non-printable key with down- and up-KeyboardEvents internally is not reliable.
@redneck-f25:
Do you mean something like https://github.com/novnc/noVNC/pull/2019
Ah, yes. Thanks fixing! I'll take a look at it soon!
@kroese:
Maybe another solution would be to only show the dialog when the CTRL key is pressed down while the tab unloads. (If that is possible to detect?). But the solution by @redneck-f25 to make it optional, is even better ofcourse.
That's an interesting idea, but I agree, making it optional sounds like the most robust way to go.