keep links from web view untouch for as long as possible, #83645

This commit is contained in:
Johannes Rieken
2019-11-29 15:51:37 +01:00
parent c4f4c9c43f
commit a71694386d
6 changed files with 13 additions and 14 deletions

View File

@@ -332,7 +332,7 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
private hookupWebviewEventDelegate(handle: extHostProtocol.WebviewPanelHandle, input: WebviewInput) {
const disposables = new DisposableStore();
disposables.add(input.webview.onDidClickLink((uri: URI) => this.onDidClickLink(handle, uri)));
disposables.add(input.webview.onDidClickLink((uri) => this.onDidClickLink(handle, uri)));
disposables.add(input.webview.onMessage((message: any) => { this._proxy.$onMessage(handle, message); }));
disposables.add(input.webview.onMissingCsp((extension: ExtensionIdentifier) => this._proxy.$onMissingCsp(handle, extension.value)));
@@ -387,9 +387,9 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
}
}
private onDidClickLink(handle: extHostProtocol.WebviewPanelHandle, link: URI): void {
private onDidClickLink(handle: extHostProtocol.WebviewPanelHandle, link: string): void {
const webview = this.getWebviewInput(handle);
if (this.isSupportedLink(webview, link)) {
if (this.isSupportedLink(webview, URI.parse(link))) {
this._openerService.open(link, { fromUserGesture: true });
}
}