@m3e/nav-menu 1.0.2 → 1.0.3

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
@@ -835,7 +835,7 @@ _M3eNavMenuElement_handleKeyDown = function _M3eNavMenuElement_handleKeyDown(e)
835
835
  case "Enter":
836
836
  case " ":
837
837
  e.preventDefault();
838
- if (item.ripple && !item.ripple.visible) {
838
+ if (e.key === " " && item.ripple && !item.ripple.visible) {
839
839
  item.ripple.show(0, 0, true);
840
840
  }
841
841
  if (item.hasChildItems) {
@@ -892,13 +892,8 @@ _M3eNavMenuElement_handleKeyDown = function _M3eNavMenuElement_handleKeyDown(e)
892
892
  };
893
893
  _M3eNavMenuElement_handleKeyUp = function _M3eNavMenuElement_handleKeyUp(e) {
894
894
  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;
895
+ if (!e.defaultPrevented && item && !item.disabled && e.key === " ") {
896
+ item.ripple?.hide();
902
897
  }
903
898
  };
904
899
  _M3eNavMenuElement_handlePointerDown = function _M3eNavMenuElement_handlePointerDown(e) {