@syncfusion/ej2-splitbuttons 19.3.44 → 19.3.53

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.
@@ -425,13 +425,23 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
425
425
  }
426
426
  this.appendArrowSpan();
427
427
  this.setActiveElem([this.element]);
428
- if (this.target || !this.createPopupOnClick) {
428
+ if ((this.target && !this.isColorPicker()) || !this.createPopupOnClick) {
429
429
  this.createPopup();
430
430
  }
431
431
  else {
432
432
  this.isPopupCreated = false;
433
433
  }
434
434
  };
435
+ DropDownButton.prototype.isColorPicker = function () {
436
+ if (!this.element) {
437
+ return false;
438
+ }
439
+ var prevElem = this.element.previousSibling;
440
+ if (prevElem && prevElem.classList && prevElem.classList.contains('e-split-colorpicker')) {
441
+ return true;
442
+ }
443
+ return false;
444
+ };
435
445
  DropDownButton.prototype.appendArrowSpan = function () {
436
446
  this.element.appendChild(this.createElement('span', {
437
447
  className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
@@ -483,6 +493,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
483
493
  attrList.forEach(function (key) {
484
494
  _this.element.removeAttribute(key);
485
495
  });
496
+ this.popupUnWireEvents();
486
497
  this.destroyPopup();
487
498
  this.isPopupCreated = false;
488
499
  if (!this.disabled) {
@@ -546,7 +557,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
546
557
  if (this.createPopupOnClick) {
547
558
  EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
548
559
  }
549
- if (popupElement) {
560
+ if (popupElement && popupElement.parentElement) {
550
561
  EventHandler.remove(popupElement, 'click', this.clickHandler);
551
562
  EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
552
563
  }
@@ -619,7 +630,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
619
630
  DropDownButton.prototype.clickHandler = function (e) {
620
631
  var trgt = e.target;
621
632
  if (closest(trgt, '[id="' + this.element.id + '"]')) {
622
- if (!this.createPopupOnClick || this.target) {
633
+ if (!this.createPopupOnClick || (this.target && !this.isColorPicker())) {
623
634
  if (this.getPopUpElement().classList.contains('e-popup-close')) {
624
635
  this.openPopUp(e);
625
636
  }
@@ -702,7 +713,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
702
713
  if (!_this.target && ul_2) {
703
714
  detach(ul_2);
704
715
  }
705
- if (!_this.target) {
716
+ if (!_this.target || _this.isColorPicker()) {
706
717
  if (_this.createPopupOnClick) {
707
718
  _this.destroyPopup();
708
719
  }