mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
fix: Fix bug that preventing scrolling menu items into view. (#8726)
* fix: Fix bug that preventing scrolling menu items into view. * chore: Deprecate now-unused-in-core functions in style.
This commit is contained in:
@@ -260,10 +260,11 @@ export class Menu {
|
||||
this.highlightedItem = item;
|
||||
// Bring the highlighted item into view. This has no effect if the menu is
|
||||
// not scrollable.
|
||||
const el = this.getElement() as Element;
|
||||
style.scrollIntoContainerView(item.getElement() as Element, el);
|
||||
|
||||
aria.setState(el, aria.State.ACTIVEDESCENDANT, item.getId());
|
||||
const el = this.getElement();
|
||||
if (el) {
|
||||
aria.setState(el, aria.State.ACTIVEDESCENDANT, item.getId());
|
||||
}
|
||||
item.getElement()?.scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user