@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.
@@ -393,13 +393,23 @@ let DropDownButton = class DropDownButton extends Component {
393
393
  }
394
394
  this.appendArrowSpan();
395
395
  this.setActiveElem([this.element]);
396
- if (this.target || !this.createPopupOnClick) {
396
+ if ((this.target && !this.isColorPicker()) || !this.createPopupOnClick) {
397
397
  this.createPopup();
398
398
  }
399
399
  else {
400
400
  this.isPopupCreated = false;
401
401
  }
402
402
  }
403
+ isColorPicker() {
404
+ if (!this.element) {
405
+ return false;
406
+ }
407
+ const prevElem = this.element.previousSibling;
408
+ if (prevElem && prevElem.classList && prevElem.classList.contains('e-split-colorpicker')) {
409
+ return true;
410
+ }
411
+ return false;
412
+ }
403
413
  appendArrowSpan() {
404
414
  this.element.appendChild(this.createElement('span', {
405
415
  className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
@@ -450,6 +460,7 @@ let DropDownButton = class DropDownButton extends Component {
450
460
  attrList.forEach((key) => {
451
461
  this.element.removeAttribute(key);
452
462
  });
463
+ this.popupUnWireEvents();
453
464
  this.destroyPopup();
454
465
  this.isPopupCreated = false;
455
466
  if (!this.disabled) {
@@ -513,7 +524,7 @@ let DropDownButton = class DropDownButton extends Component {
513
524
  if (this.createPopupOnClick) {
514
525
  EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
515
526
  }
516
- if (popupElement) {
527
+ if (popupElement && popupElement.parentElement) {
517
528
  EventHandler.remove(popupElement, 'click', this.clickHandler);
518
529
  EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
519
530
  }
@@ -586,7 +597,7 @@ let DropDownButton = class DropDownButton extends Component {
586
597
  clickHandler(e) {
587
598
  const trgt = e.target;
588
599
  if (closest(trgt, '[id="' + this.element.id + '"]')) {
589
- if (!this.createPopupOnClick || this.target) {
600
+ if (!this.createPopupOnClick || (this.target && !this.isColorPicker())) {
590
601
  if (this.getPopUpElement().classList.contains('e-popup-close')) {
591
602
  this.openPopUp(e);
592
603
  }
@@ -665,7 +676,7 @@ let DropDownButton = class DropDownButton extends Component {
665
676
  if (!this.target && ul) {
666
677
  detach(ul);
667
678
  }
668
- if (!this.target) {
679
+ if (!this.target || this.isColorPicker()) {
669
680
  if (this.createPopupOnClick) {
670
681
  this.destroyPopup();
671
682
  }