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

Web: Zen mode and refresh is stuck in centered layout #82597

bpasero opened this issue Oct 15, 2019 · 5 comments

Web: Zen mode and refresh is stuck in centered layout #82597

bpasero opened this issue Oct 15, 2019 · 5 comments


Copy link

@bpasero bpasero commented Oct 15, 2019

  • Toggle Zen mode
  • Reload window
  • You are out of Zen mode, but the editor is still in centered layout. I'd expect myself to be either 1) completely out of Zen mode without centered layout 2) completely in Zen mode with centered layout


@isidorn reply:

The issue is that zenMode is potentially toggling zen mode on onWillSaveState to cleanse the state here

This is an ugly approach which does not work in the web

@bpasero bpasero added bug web labels Oct 15, 2019
@bpasero bpasero added this to the October 2019 milestone Oct 15, 2019
Copy link

@isidorn isidorn commented Oct 23, 2019

I actually have no better idea when should I clean the zen mode state.
@bpasero is there a better time to do this in the web? Currently I listen to onWillSaveState

An ideal option is that zen mode just stores that it is active in memory and next time we start eveyrthing is clean. However zen mode is piggy backing on a lot of other features which need to be cleaned since they are stored across reloads (for example activity bar gets hidden)

Thus zen mode has to do something on shutdown.

Alterantive woudl be to change the whole zen mode implementation.

@isidorn isidorn modified the milestones: October 2019, On Deck Oct 23, 2019
Copy link
Member Author

@bpasero bpasero commented Oct 24, 2019

@isidorn you will have to find a solution that does not require any long running operations on reload or shutdown, there is no way in the web to support this currently. If you must persist state on shutdown, window.localStorage is an option (as it is sync and blocks the unload). I think it is fine to be used if we do not store too much in it. I use it already in another case for other reasons.

@vnijs vnijs mentioned this issue Dec 30, 2019
Copy link

@BearPro BearPro commented Mar 4, 2020

I have the same issue on a stable standalone version after my laptop with windows been hibernated due to this battery run down.

Version: 1.42.1 (system setup)
Commit: c47d83b
Date: 2020-02-11T14:45:59.656Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363

Copy link

@vscode-triage-bot vscode-triage-bot commented Apr 7, 2020

We closed this issue because we don't plan to address it in the foreseeable future. You can find more detailed information about our decision-making process here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

Copy link

@SpicyPete SpicyPete commented May 5, 2020

it's out of scope, but how do I get VS Code to not be stuck centered again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.