提交 d90f8214 编写于 作者: B Benjamin Pasero

fix #52576

上级 9a00a108
...@@ -362,9 +362,11 @@ export class MenubarPart extends Part { ...@@ -362,9 +362,11 @@ export class MenubarPart extends Part {
titleElement.attr('aria-label', legibleTitle); titleElement.attr('aria-label', legibleTitle);
titleElement.attr('role', 'menu'); titleElement.attr('role', 'menu');
let mnemonic = (/&&(.)/g).exec(this.topLevelTitles[menuTitle])[1]; if (this.currentEnableMenuBarMnemonics) {
if (mnemonic && this.currentEnableMenuBarMnemonics) { let mnemonic = (/&&(.)/g).exec(this.topLevelTitles[menuTitle]);
this.registerMnemonic(titleElement.getHTMLElement(), mnemonic); if (mnemonic && mnemonic[1]) {
this.registerMnemonic(titleElement.getHTMLElement(), mnemonic[1]);
}
} }
this.customMenus.push({ this.customMenus.push({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册