@syncfusion/ej2-navigations 35.1.43 → 35.2.12

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.
@@ -1149,6 +1149,7 @@ let MenuBase = class MenuBase extends Component {
1149
1149
  this.navIdx = [];
1150
1150
  this.animation = new Animation({});
1151
1151
  this.isTapHold = false;
1152
+ this.isGeneratedElement = false;
1152
1153
  this.tempItem = [];
1153
1154
  this.showSubMenuOn = 'Auto';
1154
1155
  this.isOpenCalled = false;
@@ -1194,6 +1195,7 @@ let MenuBase = class MenuBase extends Component {
1194
1195
  let ele = this.element;
1195
1196
  const ejInstance = getValue('ej2_instances', ele);
1196
1197
  const ul = this.createElement('ul');
1198
+ this.isGeneratedElement = true;
1197
1199
  const wrapper = this.createElement('EJS-MENU', { className: 'e-' + this.getModuleName() + '-wrapper' });
1198
1200
  for (let idx = 0, len = ele.attributes.length; idx < len; idx++) {
1199
1201
  ul.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
@@ -3607,7 +3609,9 @@ let MenuBase = class MenuBase extends Component {
3607
3609
  this.element.innerHTML = '';
3608
3610
  }
3609
3611
  this.removeAttributes();
3610
- wrapper.parentNode.insertBefore(this.element, wrapper);
3612
+ if (wrapper && wrapper.parentNode && !this.isGeneratedElement) {
3613
+ wrapper.parentNode.insertBefore(this.element, wrapper);
3614
+ }
3611
3615
  this.clonedElement = null;
3612
3616
  }
3613
3617
  if (this.popupObj) {
@@ -3639,6 +3643,9 @@ let MenuBase = class MenuBase extends Component {
3639
3643
  if (this.template) {
3640
3644
  this.clearTemplate(['template']);
3641
3645
  }
3646
+ if (this.element && !this.element.classList.length) {
3647
+ this.element.removeAttribute('class');
3648
+ }
3642
3649
  }
3643
3650
  this.rippleFn = null;
3644
3651
  }