-
Couldn't load subscription status.
- Fork 35.8k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitiesverifiedVerification succeededVerification succeededwebviewWebview issuesWebview issues
Milestone
Description
- Existing issues searched: true
- Tested under insider edition: true
- Does this issue occur when all extensions are disabled?: true
- VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T23:43:35.476Z)
- OS version: Windows_NT x64 10.0.18362
Bug Report
Steps to reproduce
- Create a webview panel with
viewColumnset to One - Call
revealon the panel withviewColumnset to Two (not exists yet) - The panel only reveals to Column One.
Workaround to make it right
- Create a webview panel with
viewColumnset to One - Execute
workbench.action.focusSecondEditorGroupcommand to ensure Group Two exists - Call
revealon the panel withviewColumnset to Two (exists now) - The panel reveals to Column Two.
Contrast Example
showTextDocument
Designed behavior
- When clicking
Code Now, a doc will be called byshowTextDocumentin Column 3.
- If I have 3 Columns, then doc will be open in Column 3.
- If I have 2 Columns, but Column 2 is empty, the doc will be open in Column 2.
- If I have 1 non-empty Column, then doc will be open in Column 2.
This behavior is as by design.
reveal
Designed behavior
- When creating the webview, the panel will be called by
revealto Column 3. - When clicking
Code Now, the panel will be called byrevealto Column 2.

↑ Here, if all 3 columns exists, the panel will be created to Column 3 and moved to Column 2, as by design.
- If I have 2 non-empty Columns, and creating a new webview, the panel get revealed to Column 2, which should have been in Column 3.
- If I have 2 non-empty Columns, and clicking
Code Now, the panel get revealed to Column 2, which is as by design. - If I have 1 non-empty Columns, and creating a new webview, the panel get revealed to Column 1, which should have been in Column 2.
- If I have 1 non-empty Columns, and clicking
Code Now, the panel get revealed to Column 1, which should have been in Column 2.
we only allow revealing text documents in the group one greater than the current number of groups.
So, for WebviewPanel.reveal, it's not one greater than, it's equal to, which is not by design.
IronGeek and michelkaporin
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitiesverifiedVerification succeededVerification succeededwebviewWebview issuesWebview issues

