Skip to content
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

Fixes #44396 - cancel alt up after mouse down on menu #44397

Merged
merged 1 commit into from May 9, 2018

Conversation

eamodio
Copy link
Contributor

@eamodio eamodio commented Feb 26, 2018

Fixes #44396

@bpasero bpasero requested a review from isidorn February 26, 2018 09:48
@bpasero bpasero assigned bpasero and isidorn and unassigned bpasero Feb 26, 2018
@bpasero bpasero removed the request for review from isidorn February 26, 2018 09:48
@bpasero
Copy link
Member

bpasero commented Feb 26, 2018

@isidorn not sure if you or Joh, but I remember you were in this code for Alt support in menus.

@jrieken jrieken added this to the March 2018 milestone Feb 28, 2018
@isidorn isidorn modified the milestones: March 2018, On Deck Mar 6, 2018
const altKey = AltKeyEmitter.getInstance(this._contextMenuService);
if (altKey.isPressed) {
altKey.suppressAltKeyUp();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eamodio Why is this logic only needed in one place and not in the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrieken I'm not sure I'm following — which other place? Do you mean in ContextAwareMenuItemActionItem? If so it might need to be there too, but I can't get any alt stuff to work with any context menus — if you hold alt and try to open a context menu it opens and quickly disappears, and if you hit alt while a context menu is open it just disappears too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have two references in the same file... But then I haven't been in this code for long. @isidorn I leave the review to you.

suppressAltKeyUp() {
this._suppressAltKeyUp = true;
}

@memoize
static getInstance(contextMenuService: IContextMenuService) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isidorn unrelated, related but using @memoize is risky because I am pretty sure it memoizes without looking at the arguments and I am not sure there is only one contextMenuService around (i might be mistaken...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrieken yes it ignores the arguments. Thanks for letting me know, will try to fix.

@jrieken jrieken removed their assignment Mar 26, 2018
@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

This week we are in endgame and on thursday I go on vacation -> pushing to next milestone when I will have time to review.

@isidorn isidorn modified the milestones: March 2018, April 2018 Mar 26, 2018
@eamodio
Copy link
Contributor Author

eamodio commented Apr 10, 2018

@isidorn let me know if you need anything else on this.

@isidorn
Copy link
Contributor

isidorn commented Apr 20, 2018

@eamodio sorry for the slow response I came back from vacation a couple of days ago. Thus pushing this to may.

I also see conficlits with the master. Can you please resolve those conflicts so I can review this some time next week. Thanks

@isidorn isidorn modified the milestones: April 2018, May 2018 Apr 20, 2018
@eamodio
Copy link
Contributor Author

eamodio commented May 5, 2018

@isidorn no worries, sorry for the delay in re-syncing this 😄

@isidorn
Copy link
Contributor

isidorn commented May 9, 2018

@eamodio I tried this out and it works expected. I will just add some comments since this is a workaround so we remember what it was for.
Merging it in, thanks 🍺

@isidorn isidorn merged commit 6f56ff3 into microsoft:master May 9, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alt+Click on a toolbar button causes the Menu Bar to toggle on KeyUp
4 participants