Skip to content

Commit 12b2e0f

Browse files
authored
Merge pull request microsoft#172392 from microsoft/hediet/rural-iguana
Fixes microsoft#172167
2 parents 212bb1a + 2e70553 commit 12b2e0f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export interface Matches {
2828

2929
export interface KeybindingLabelOptions extends IKeybindingLabelStyles {
3030
renderUnboundKeybindings?: boolean;
31+
/**
32+
* Default false.
33+
*/
34+
disableTitle?: boolean;
3135
}
3236

3337
export type CSSValueString = string;
@@ -101,7 +105,12 @@ export class KeybindingLabel {
101105
dom.append(this.domNode, $('span.monaco-keybinding-key-chord-separator', undefined, ' '));
102106
this.renderChord(this.domNode, secondChord, this.matches ? this.matches.chordPart : null);
103107
}
104-
this.domNode.title = this.keybinding.getAriaLabel() || '';
108+
const title = (this.options.disableTitle ?? false) ? undefined : this.keybinding.getAriaLabel() || undefined;
109+
if (title !== undefined) {
110+
this.domNode.title = title;
111+
} else {
112+
this.domNode.removeAttribute('title');
113+
}
105114
} else if (this.options && this.options.renderUnboundKeybindings) {
106115
this.renderUnbound(this.domNode);
107116
}

src/vs/editor/contrib/inlineCompletions/browser/inlineSuggestionHintsWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class StatusBarViewItem extends MenuEntryActionViewItem {
235235
if (this.label) {
236236
const div = h('div.keybinding').root;
237237

238-
const k = new KeybindingLabel(div, OS);
238+
const k = new KeybindingLabel(div, OS, { disableTitle: true });
239239
k.set(kb);
240240
this.label.textContent = this._action.label;
241241
this.label.appendChild(div);

0 commit comments

Comments
 (0)