@momentum-design/components 0.133.35 → 0.133.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -402,7 +402,8 @@ class MenuPopover extends Popover {
402
402
  if (this.menuItems.length > 0) {
403
403
  this.menuItems.forEach(menuitem => menuitem.setAttribute('tabindex', '-1'));
404
404
  this.menuItems[currentIndex].setAttribute('tabindex', '0');
405
- this.menuItems[currentIndex].focus();
405
+ this.menuItems[currentIndex].focus({ preventScroll: true });
406
+ this.menuItems[currentIndex].scrollIntoView({ block: 'nearest' });
406
407
  }
407
408
  }
408
409
  /**
@@ -424,7 +425,8 @@ class MenuPopover extends Popover {
424
425
  return;
425
426
  this.menuItems[oldIndex].setAttribute('tabindex', '-1');
426
427
  this.menuItems[newIndex].setAttribute('tabindex', '0');
427
- this.menuItems[newIndex].focus();
428
+ this.menuItems[newIndex].focus({ preventScroll: true });
429
+ this.menuItems[newIndex].scrollIntoView({ block: 'nearest' });
428
430
  }
429
431
  /**
430
432
  * Closes all menu popovers in the stack.
@@ -2,6 +2,7 @@ import { css } from 'lit';
2
2
  const styles = css `
3
3
  :host::part(popover-content) {
4
4
  padding: 0.75rem 0.5rem;
5
+ scroll-padding-block: 0.25rem;
5
6
  }
6
7
 
7
8
  ::slotted(mdc-divider) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.133.35",
4
+ "version": "0.133.36",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"