@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.
@@ -1592,11 +1592,15 @@ let MenuBase = class MenuBase extends Component {
1592
1592
  closedLi = trgtpopUp.querySelector('[id="' + trgtliId + '"]');
1593
1593
  trgtLi = (liElem && trgtpopUp.querySelector('[id="' + liElem.id + '"]'));
1594
1594
  }
1595
+ else if (trgtpopUp) {
1596
+ closedLi = trgtpopUp.querySelector('.e-menu-item.e-selected');
1597
+ trgtLi = (liElem && trgtpopUp.querySelector('[id="' + liElem.id + '"]'));
1598
+ }
1595
1599
  const submenus = liElem && liElem.querySelectorAll('.e-menu-item');
1596
1600
  if (isOpen && this.hamburgerMode && ulIndex && !(submenus.length)) {
1597
1601
  this.afterCloseMenu(e);
1598
1602
  }
1599
- else if (isOpen && !this.hamburgerMode && this.navIdx.length && closedLi && !trgtLi && this.keyType !== 'left') {
1603
+ else if (isOpen && !this.hamburgerMode && closedLi && !trgtLi && this.keyType !== 'left' && (this.navIdx.length || !this.isMenu && this.navIdx.length === 0)) {
1600
1604
  let ele = (e && e.target.classList.contains('e-vscroll'))
1601
1605
  ? closest(e.target, '.e-menu-wrapper') : null;
1602
1606
  if (ele) {
@@ -1610,7 +1614,7 @@ let MenuBase = class MenuBase extends Component {
1610
1614
  }
1611
1615
  }
1612
1616
  else if (isOpen && !isIterated && !ulIndex && ((this.hamburgerMode && this.navIdx.length) ||
1613
- this.navIdx.length === 1)) {
1617
+ this.navIdx.length === 1 && liElem && trgtpopUp !== liElem.parentElement)) {
1614
1618
  this.closeMenu(null, e);
1615
1619
  }
1616
1620
  else if (isOpen && isNullOrUndefined(ulIndex) && this.navIdx.length) {