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
fix: don't append Shift modifier text twice to accelerators #15400
Conversation
@@ -19,17 +19,17 @@ index 7e55ef366ac8320f730cdcb268453b1fa2710887..c3fb98b426cd7c12f66eaaf358f4ff18 | |||
@@ -21,9 +22,7 @@ | |||
#include <windows.h> | |||
#endif | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those spaces are important, leave them in please! this patch should be exactly as exported by git-export-patches
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I knew there was something up with those spaces, gonna fix asap
65559f0
to
55dabaf
Compare
@nornagon thoughts on the revised PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I still want tests though :(
55dabaf
to
569e264
Compare
@nornagon ask, and thou shall receive 🙇 |
atom/browser/api/atom_api_menu.cc
Outdated
@@ -155,6 +155,13 @@ base::string16 Menu::GetSublabelAt(int index) const { | |||
return model_->GetSublabelAt(index); | |||
} | |||
|
|||
base::string16 Menu::GetAcceleratorTextAt(int index) const { | |||
auto* accelerator = new ui::Accelerator(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who owns this accelerator
? I don't see any explicit ownership claim in the code path, maybe I am missing something here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oooh, good catch! this should probably be on the stack.
auto* accelerator = new ui::Accelerator(); | |
ui::Accelerator accelerator; | |
model_->GetAcceleratorAtWithParams(index, true, &accelerator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Thanks for catching this
976b4d1
to
880b9bb
Compare
3a6c073
to
2b0e4be
Compare
Release Notes Persisted
|
Description of Change
Fixes #15392. For some reason our patch applied a
Shift
modifier to a whole bunch of accelerator characters (likeBackspace
, butTab
andEnter
were also affected), my best guess is that those used to be broken withShift
but now are working properly inchromium
.I'll backport this manually, trop couldn't deal with
4-0-x
.Checklist
npm test
passesRelease Notes
Notes: fixed some accelerators having
Shift
appended to them twice