@syncfusion/ej2-navigations 20.4.43 → 20.4.44

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.
@@ -1672,11 +1672,15 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1672
1672
  closedLi = trgtpopUp.querySelector('[id="' + trgtliId + '"]');
1673
1673
  trgtLi = (liElem_1 && trgtpopUp.querySelector('[id="' + liElem_1.id + '"]'));
1674
1674
  }
1675
+ else if (trgtpopUp) {
1676
+ closedLi = trgtpopUp.querySelector('.e-menu-item.e-selected');
1677
+ trgtLi = (liElem_1 && trgtpopUp.querySelector('[id="' + liElem_1.id + '"]'));
1678
+ }
1675
1679
  var submenus = liElem_1 && liElem_1.querySelectorAll('.e-menu-item');
1676
1680
  if (isOpen && _this.hamburgerMode && ulIndex && !(submenus.length)) {
1677
1681
  _this.afterCloseMenu(e);
1678
1682
  }
1679
- else if (isOpen && !_this.hamburgerMode && _this.navIdx.length && closedLi && !trgtLi && _this.keyType !== 'left') {
1683
+ else if (isOpen && !_this.hamburgerMode && closedLi && !trgtLi && _this.keyType !== 'left' && (_this.navIdx.length || !_this.isMenu && _this.navIdx.length === 0)) {
1680
1684
  var ele = (e && e.target.classList.contains('e-vscroll'))
1681
1685
  ? closest(e.target, '.e-menu-wrapper') : null;
1682
1686
  if (ele) {
@@ -1690,7 +1694,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1690
1694
  }
1691
1695
  }
1692
1696
  else if (isOpen && !isIterated && !ulIndex && ((_this.hamburgerMode && _this.navIdx.length) ||
1693
- _this.navIdx.length === 1)) {
1697
+ _this.navIdx.length === 1 && liElem_1 && trgtpopUp !== liElem_1.parentElement)) {
1694
1698
  _this.closeMenu(null, e);
1695
1699
  }
1696
1700
  else if (isOpen && isNullOrUndefined(ulIndex) && _this.navIdx.length) {