Skip to content

Commit

Permalink
Fix F6 in extension page webviews
Browse files Browse the repository at this point in the history
For #101185

Make sure we set the correct parent flow to
  • Loading branch information
mjbvz committed Nov 12, 2020
1 parent 4da8e50 commit 050a123
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Action, IAction } from 'vs/base/common/actions';
import { isPromiseCanceledError } from 'vs/base/common/errors';
import { dispose, toDisposable, Disposable, DisposableStore, IDisposable } from 'vs/base/common/lifecycle';
import { domEvent } from 'vs/base/browser/event';
import { append, $, finalHandler, join, hide, show, addDisposableListener, EventType } from 'vs/base/browser/dom';
import { append, $, finalHandler, join, hide, show, addDisposableListener, EventType, setParentFlowTo } from 'vs/base/browser/dom';
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
Expand Down Expand Up @@ -284,6 +284,7 @@ export class ExtensionEditor extends EditorPane {
const navbar = new NavBar(body);

const content = append(body, $('.content'));
content.id = generateUuid(); // An id is needed for the webview parent flow to

this.template = {
builtin,
Expand Down Expand Up @@ -575,7 +576,9 @@ export class ExtensionEditor extends EditorPane {
}, {}, undefined));

webview.claim(this, this.scopedContextKeyService);
setParentFlowTo(webview.container, template.content);
webview.layoutWebviewOverElement(template.content);

webview.html = body;

this.contentDisposables.add(webview.onDidFocus(() => this.fireOnDidFocus()));
Expand Down

0 comments on commit 050a123

Please sign in to comment.