提交 92417ddd 编写于 作者: M Matt Bierner

Revert "Fixes webview responding shortcuts twice on linux (#84967)"

This reverts commit a406fd6b.

Fixes #85102
上级 0e5a5f65
......@@ -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',
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册