E52E fix: default accelerator for role-based menu items by codebytere · Pull Request #49558 · electron/electron · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@codebytere
Copy link
Member
@codebytere codebytere commented Jan 28, 2026

Description of Change

Closes #48313.

Role-based menu items (copy, paste, cut, etc.) were returning null for their accelerator property, even though these roles have default keyboard shortcuts defined in menu-item-roles.ts.

To fix this, pass roles.getDefaultAccelerator(this.role) as the default value to overrideReadOnlyProperty('accelerator') so that role-based items correctly expose their expected accelerators.

Also fixes an incorrect type in menu-item.md.

Checklist

Release Notes

Notes: Fixed an issue where role-based menu items were incorrectly returning null for their accelerator property.

Co-authored-by: Kimgun3383 <tygob5247@gmail.com>
@codebytere codebytere added semver/patch backwards-compatible bug fixes target/39-x-y 9E84 PR should also be added to the "39-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. labels Jan 28, 2026
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jan 28, 2026
@codebytere codebytere changed the title fix: apply default accelerator for role-based menu items fix: default accelerator for role-based menu items Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-pr 🌱 PR opened recently semver/patch backwards-compatible bug fixes target/39-x-y PR should also be added to the "39-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accelerator null on predefined menu roles

2 participants

0