@m3e/nav-menu 1.0.2 → 1.0.4

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.
package/dist/index.js CHANGED
@@ -441,11 +441,13 @@ M3eNavMenuItemElement.styles = css `
441
441
  display: block;
442
442
  flex: none;
443
443
  outline: none;
444
+ user-select: none;
444
445
  position: relative;
445
446
  font-size: var(--m3e-nav-menu-item-font-size, ${DesignToken.typescale.standard.label.large.fontSize});
446
447
  font-weight: var(--m3e-nav-menu-item-font-weight, ${DesignToken.typescale.standard.label.large.fontWeight});
447
448
  line-height: var(--m3e-nav-menu-item-line-height, ${DesignToken.typescale.standard.label.large.lineHeight});
448
449
  letter-spacing: var(--m3e-nav-menu-item-tracking, ${DesignToken.typescale.standard.label.large.tracking});
450
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
449
451
  }
450
452
  .base {
451
453
  display: flex;
@@ -835,7 +837,7 @@ _M3eNavMenuElement_handleKeyDown = function _M3eNavMenuElement_handleKeyDown(e)
835
837
  case "Enter":
836
838
  case " ":
837
839
  e.preventDefault();
838
- if (item.ripple && !item.ripple.visible) {
840
+ if (e.key === " " && item.ripple && !item.ripple.visible) {
839
841
  item.ripple.show(0, 0, true);
840
842
  }
841
843
  if (item.hasChildItems) {
@@ -892,13 +894,8 @@ _M3eNavMenuElement_handleKeyDown = function _M3eNavMenuElement_handleKeyDown(e)
892
894
  };
893
895
  _M3eNavMenuElement_handleKeyUp = function _M3eNavMenuElement_handleKeyUp(e) {
894
896
  const item = this[selectionManager].activeItem;
895
- if (e.defaultPrevented || !item || item.disabled)
896
- return;
897
- switch (e.key) {
898
- case "Enter":
899
- case " ":
900
- item.ripple?.hide();
901
- break;
897
+ if (!e.defaultPrevented && item && !item.disabled && e.key === " ") {
898
+ item.ripple?.hide();
902
899
  }
903
900
  };
904
901
  _M3eNavMenuElement_handlePointerDown = function _M3eNavMenuElement_handlePointerDown(e) {