-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Prevent Cmd/Ctrl+W from closing tab in Codespaces online editor (still not fixed) #197731
Comments
As a workaround: fullscreen the page or install it as PWA and keybindings should work better. |
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
Not available for Firefox though |
When I press cmd+w (on Mac) then whole browser tab gets closed.
I found similar issue [link 1] that marked as duplicate of this issue [link 2] BUT neither of them solving it.
As mentioned in [link 2] I set up
window.confirmBeforeClose
setting (to optionalways
) but it changed nothing - tab just keeps immideately closed.THEN I tested idea prompted in [link 1] about adding
window.onbeforeunload
, I typed into browser tab's console this line:And NOW browser asked me about closing tab, just like it normally do in other web sites.
But it looks like vscode itself has some event handlers on that case and when I pressed
cmd+w
, I seen browser's prompt (ie Do your really want to leave the page) and also noticed how console has flooded with errors and finally an error window from vscode displayed which told me that vscode broken and I must reload the tab.So what do we have as result.
Solution with using
window.confirmBeforeClose
setting - not works and it actually not even tries to work. Because if it would, then it surely must use something similar towindow.onbeforeunload = () => true;
that prevents browser from closing tab.Both referenced issues relate to this one, but are not duplicates since they are closed long time ago and not solved the problem.
Version: 1.84.1
Commit: 2b35e1e
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Embedder: codespaces
The text was updated successfully, but these errors were encountered: