Skip to content

Commit

Permalink
Respect alt action precondition. Fix microsoft#147024
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Apr 7, 2022
1 parent 3a90a6a commit ecb3510
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/platform/actions/browser/menuEntryActionViewItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class MenuEntryActionViewItem extends ActionViewItem {
let alternativeKeyDown = this._altKey.keyStatus.altKey || ((isWindows || isLinux) && this._altKey.keyStatus.shiftKey);

const updateAltState = () => {
const wantsAltCommand = mouseOver && alternativeKeyDown;
const wantsAltCommand = mouseOver && alternativeKeyDown && !!this._commandAction.alt?.enabled;
if (wantsAltCommand !== this._wantsAltCommand) {
this._wantsAltCommand = wantsAltCommand;
this.updateLabel();
Expand Down

0 comments on commit ecb3510

Please sign in to comment.