提交 9af426f0 编写于 作者: I isidor

fixes #50926

上级 518e0363
......@@ -152,7 +152,7 @@ export class MenuItemActionItem extends ActionItem {
static readonly ICON_PATH_TO_CSS_RULES: Map<string /* path*/, string /* CSS rule */> = new Map<string, string>();
private _wantsAltCommand: boolean = false;
private _wantsAltCommand: boolean;
private _itemClassDispose: IDisposable;
constructor(
......@@ -187,7 +187,8 @@ export class MenuItemActionItem extends ActionItem {
this._updateItemClass(this._action.item);
let mouseOver = false;
let alternativeKeyDown = false;
const alternativeKeyEmitter = AlternativeKeyEmitter.getInstance(this._contextMenuService);
let alternativeKeyDown = alternativeKeyEmitter.isPressed;
const updateAltState = () => {
const wantsAltCommand = mouseOver && alternativeKeyDown;
......@@ -199,7 +200,7 @@ export class MenuItemActionItem extends ActionItem {
}
};
this._callOnDispose.push(AlternativeKeyEmitter.getInstance(this._contextMenuService).event(value => {
this._callOnDispose.push(alternativeKeyEmitter.event(value => {
alternativeKeyDown = value;
updateAltState();
}));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册