-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Please add some onbeforeunload handler in the workspace view to avoid unexpected tab exit #18416
Comments
VS Code already does it by default. If you want to have it always please change your settings |
Dear @akosyakov, Sorry but I'm not a VS code user 😅 I only use Gitpod's Browser Terminal (currently in beta IIUC) as a Gitpod IDE. Is this confirmExit option available as well for all Gitpod web editors (other than VS code)? |
So I believe you could reopen this issue :) |
Sorry, yes makes sense, we should support something like that there. |
Dear @akosyakov, do you know:
Sorry if this is not the proper place to ask… |
Dear Gitpod maintainers,
I guess you already replied to this one, thanks for the release 👍 ❗ 🙏 What about the second question?
Cheers, |
Thanks @loujaybee for adding this label :) — Actually I noticed the issue with emacs, so maybe it could be tagged Thanks for your time! |
Dear @loujaybee, Do you think this would help if I'd try to open a PR to implement this small (but very useful IMHO) enhancement? Of course, I might need a bit of guidance at first, to spot the main components to change… |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi! Please do not close, I do think this feature request is worth implementing. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please do not close, this feature request should definitely be addressed! Feel free to start implementing it, otherwise I may try to open a PR in a couple of weeks. |
Good news! As of later today, you'll be able to set the This can be done in your user variables to apply to all projects, on a repository configuration to apply to just one repository or by other means like adding the environment variable to the workspace Docker image itself. |
Is your feature request related to a problem? Please describe
Currently using Gitpod in the browser is annoying when (like me) the
Ctrl+w
shortcut is wired in my hands, both in emacs and shell context…Indeed, this closes the window.
Beyond my particular case, I believe many users also get annoyed when they mistype
Ctrl+w
and close their workspace tab.Describe the behaviour you'd like
As suggested in #17724 (comment)
I would like to request some closing confirmation in all Gitpod browser editors,
→ with some JS code such as
window.onbeforeunload = function(e) {e.preventDefault(); return false;}
and just undo this setting at workspace stop (e.g.
gp stop
, leading to page Stopped / Go-to-Dashboard)→ with some JS code such as
window.onbeforeunload = null;
Describe alternatives you've considered
One might otherwise try to disable the
Ctrl+w
shorcut in the browser, however as noted in#17724 (comment)
this is neither browser-cross-compatible nor builtin in general, one needs to install 3rd-party extensions to do this.
So, adding an onbeforeunload handler looks way simpler, and fully works.
Additional context
N/A
The text was updated successfully, but these errors were encountered: