提交 2124bf22 编写于 作者: M Matt Bierner

Move find widget dispose to widget itself

上级 ddab4d65
......@@ -149,6 +149,14 @@ export abstract class SimpleFindWidget extends Widget {
this._findInput.style(inputStyles);
}
dipose() {
super.dispose();
if (this._domNode && this._domNode.parentElement) {
this._domNode.parentElement.removeChild(this._domNode);
}
}
public getDomNode(): HTMLElement {
return this._domNode;
}
......
......@@ -204,9 +204,9 @@ export class Webview {
if (this._webview.parentElement) {
this._webview.parentElement.removeChild(this._webview);
const findWidgetDomNode = this._webviewFindWidget.getDomNode();
findWidgetDomNode.parentElement.removeChild(findWidgetDomNode);
}
this._webviewFindWidget.dispose();
}
private readonly _onDidClickLink = new Emitter<URI>();
......@@ -331,7 +331,7 @@ export class Webview {
this._environmentService.extensionDevelopmentPath
]);
registerFileProtocol(contents, 'vscode-workspace-resource', () =>
this._options.localResourceRoots.map(uri => uri.fsPath)
(this._options.localResourceRoots || []).map(uri => uri.fsPath)
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册