Skip to content

isStandalone is a const which is wrong if the state changes #143197

@a-stewart

Description

@a-stewart

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.63.0 (the code seems to be the same at main)
  • OS Version: Mac 12.2.1 / web

Steps to Reproduce:

  1. Open vscode in a browser tab
  2. Switch to the PWA
  3. Open a new window
  4. Observe that the new window opens in a new browser tab, rather than a new standalone window

This is because whether it opens in a new standalone window is determined by the constant isStandalone.
However, this property isn't constant, resulting in unexpected behaviour if it changes.

It would be better to instead make this a method. We can avoid having to poll each time by adding a watcher to this method.

I'll follow up with a PR.

Metadata

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeededwebIssues related to running VSCode in the web

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions