@syncfusion/ej2-navigations 35.1.43 → 35.1.46

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.
@@ -1222,6 +1222,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1222
1222
  _this.navIdx = [];
1223
1223
  _this.animation = new Animation({});
1224
1224
  _this.isTapHold = false;
1225
+ _this.isGeneratedElement = false;
1225
1226
  _this.tempItem = [];
1226
1227
  _this.showSubMenuOn = 'Auto';
1227
1228
  _this.isOpenCalled = false;
@@ -1268,6 +1269,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1268
1269
  var ele = this.element;
1269
1270
  var ejInstance = getValue('ej2_instances', ele);
1270
1271
  var ul = this.createElement('ul');
1272
+ this.isGeneratedElement = true;
1271
1273
  var wrapper = this.createElement('EJS-MENU', { className: 'e-' + this.getModuleName() + '-wrapper' });
1272
1274
  for (var idx = 0, len = ele.attributes.length; idx < len; idx++) {
1273
1275
  ul.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
@@ -3723,7 +3725,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3723
3725
  this.element.innerHTML = '';
3724
3726
  }
3725
3727
  this.removeAttributes();
3726
- wrapper.parentNode.insertBefore(this.element, wrapper);
3728
+ if (wrapper && wrapper.parentNode && !this.isGeneratedElement) {
3729
+ wrapper.parentNode.insertBefore(this.element, wrapper);
3730
+ }
3727
3731
  this.clonedElement = null;
3728
3732
  }
3729
3733
  if (this.popupObj) {
@@ -3755,6 +3759,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3755
3759
  if (this.template) {
3756
3760
  this.clearTemplate(['template']);
3757
3761
  }
3762
+ if (this.element && !this.element.classList.length) {
3763
+ this.element.removeAttribute('class');
3764
+ }
3758
3765
  }
3759
3766
  this.rippleFn = null;
3760
3767
  };