@syncfusion/ej2-splitbuttons 19.3.45 → 19.4.38

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
@@ -587,7 +597,7 @@ let DropDownButton = class DropDownButton extends Component {
587
597
  clickHandler(e) {
588
598
  const trgt = e.target;
589
599
  if (closest(trgt, '[id="' + this.element.id + '"]')) {
590
- if (!this.createPopupOnClick || this.target) {
600
+ if (!this.createPopupOnClick || (this.target && !this.isColorPicker())) {
591
601
  if (this.getPopUpElement().classList.contains('e-popup-close')) {
592
602
  this.openPopUp(e);
593
603
  }
@@ -666,7 +676,7 @@ let DropDownButton = class DropDownButton extends Component {
666
676
  if (!this.target && ul) {
667
677
  detach(ul);
668
678
  }
669
- if (!this.target) {
679
+ if (!this.target || this.isColorPicker()) {
670
680
  if (this.createPopupOnClick) {
671
681
  this.destroyPopup();
672
682
  }