Skip to content

Commit

Permalink
Revert "Fixes webview responding shortcuts twice on linux (#84967)"
Browse files Browse the repository at this point in the history
This reverts commit a406fd6.

Fixes #85102
  • Loading branch information
mjbvz committed Nov 19, 2019
1 parent 0e5a5f6 commit 92417dd
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { URI } from 'vs/base/common/uri';
import { areWebviewInputOptionsEqual } from 'vs/workbench/contrib/webview/browser/webviewWorkbenchService';
import { WebviewThemeDataProvider } from 'vs/workbench/contrib/webview/common/themeing';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { isLinux } from 'vs/base/common/platform';

export const enum WebviewMessageChannels {
onmessage = 'onmessage',
Expand Down Expand Up @@ -123,15 +122,12 @@ export abstract class BaseWebview<T extends HTMLElement> extends Disposable {
this.handleFocusChange(false);
}));

if (!isLinux) {
// Fixes #82670 webview responding shortcuts twice on linux.
this._register(this.on('did-keydown', (data: KeyboardEvent) => {
// Electron: workaround for https://github.com/electron/electron/issues/14258
// We have to detect keyboard events in the <webview> and dispatch them to our
// keybinding service because these events do not bubble to the parent window anymore.
this.handleKeyDown(data);
}));
}
this._register(this.on('did-keydown', (data: KeyboardEvent) => {
// Electron: workaround for https://github.com/electron/electron/issues/14258
// We have to detect keyboard events in the <webview> and dispatch them to our
// keybinding service because these events do not bubble to the parent window anymore.
this.handleKeyDown(data);
}));

this.style();
this._register(webviewThemeDataProvider.onThemeDataChanged(this.style, this));
Expand Down

0 comments on commit 92417dd

Please sign in to comment.