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

feat: Confirmation before closing the tab #1

Closed
billchurch opened this issue Aug 31, 2024 · 1 comment
Closed

feat: Confirmation before closing the tab #1

billchurch opened this issue Aug 31, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@billchurch
Copy link
Owner

via @israel-tsadok-silk from billchurch/webssh2#368

Optional confirmation before closing the tab. A very common keyboard shortcut for Linux is Ctrl-W, and people keep accidentally closing their ssh tabs when trying to delete a word. Browsers allow setting a beforeunload event listener that asks for a confirmation before the tab gets closed, which would be very helpful. When I tested this, I was able to add a confirmation but the session got disconnected anyway, so this might require some tweaking of the current event handlers.

@billchurch billchurch added the enhancement New feature or request label Aug 31, 2024
@billchurch
Copy link
Owner Author

image

As far as I can tell, this should work for all browsers as long as they follow BeforeUnloadEvent, but I've only tested with Chrome 131.0.6778.86 and Safari 18.1.1 (20619.2.8.11.12) on macOS

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

No branches or pull requests

1 participant