Skip to content

Fix/disposable #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 14, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove attempts to review webview
  • Loading branch information
ShMcK committed Jul 14, 2019
commit b1194340528f6b1e68f111f6826dcf5bc91cee90
15 changes: 3 additions & 12 deletions src/editor/ReactWebView.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ class ReactWebView {

// Listen for when the panel is disposed
// This happens when the user closes the panel or when the panel is closed programatically
// this.panel.onDidDispose(() => this.dispose(), null, this.disposables)
this.panel.onDidDispose(() => this.dispose(), null, this.disposables)

// Handle messages from the webview
const onReceive = (action: string | CR.Action) => vscode.commands.executeCommand('coderoad.receive_action', action)
@@ -38,15 +38,6 @@ class ReactWebView {
this.panel.reveal(vscode.ViewColumn.Two)
}

this.panel.onDidDispose(() => {
updateWindows()
})

// this.panel.onDidChangeViewState(() => {
// console.log('onDidChangeViewState')
// updateWindows()
// })

// prevents new panels from going ontop of coderoad panel
vscode.window.onDidChangeActiveTextEditor(param => {
if (!param || param.viewColumn !== vscode.ViewColumn.Two) {
@@ -145,8 +136,8 @@ class ReactWebView {
<link rel="stylesheet" type="text/css" href="${styleUri}">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src vscode-resource: https:; script-src 'nonce-${n1}' 'nonce-${n2}' 'nonce-${n3}'; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
<base href="${vscode.Uri.file(path.join(this.extensionPath, 'build')).with({
scheme: 'vscode-resource',
})}/">
scheme: 'vscode-resource',
})}/">
<style></style>
</head>