Revert "fix!: Remove the blocklyMenuItemHighlight CSS class and use the hover…" (#8800)

This reverts commit d6125d4fb9.
This commit is contained in:
Aaron Dodson
2025-03-12 09:27:47 -07:00
committed by GitHub
parent fa4fce5c12
commit 00d77456c9
3 changed files with 25 additions and 1 deletions

View File

@@ -249,9 +249,11 @@ export class Menu {
setHighlighted(item: MenuItem | null) {
const currentHighlighted = this.highlightedItem;
if (currentHighlighted) {
currentHighlighted.setHighlighted(false);
this.highlightedItem = null;
}
if (item) {
item.setHighlighted(true);
this.highlightedItem = item;
// Bring the highlighted item into view. This has no effect if the menu is
// not scrollable.