@syncfusion/ej2-splitbuttons 24.2.3 → 24.2.7

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.
@@ -638,6 +638,7 @@ let DropDownButton = class DropDownButton extends Component {
638
638
  return;
639
639
  }
640
640
  if (e.keyCode === 13 && this.activeElem[0].classList.contains('e-split-btn')) {
641
+ this.triggerSelect(e);
641
642
  this.activeElem[0].focus();
642
643
  return;
643
644
  }
@@ -704,22 +705,28 @@ let DropDownButton = class DropDownButton extends Component {
704
705
  }
705
706
  else {
706
707
  if (closest(trgt, '[id="' + this.getPopUpElement().id + '"]')) {
707
- let eventArgs;
708
- let liIdx;
709
- let item;
710
- const li = this.getLI(trgt);
708
+ const li = this.getLI(e.target);
711
709
  if (li) {
712
- liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
713
- item = this.items[liIdx];
714
- if (item) {
715
- eventArgs = { element: li, item: item, event: e };
716
- this.trigger('select', eventArgs);
717
- }
710
+ this.triggerSelect(e);
718
711
  this.closePopup(e, this.activeElem[0]);
719
712
  }
720
713
  }
721
714
  }
722
715
  }
716
+ triggerSelect(e) {
717
+ let eventArgs;
718
+ let liIdx;
719
+ let item;
720
+ const li = this.getLI(e.target);
721
+ if (li) {
722
+ liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
723
+ item = this.items[liIdx];
724
+ if (item) {
725
+ eventArgs = { element: li, item: item, event: e };
726
+ this.trigger('select', eventArgs);
727
+ }
728
+ }
729
+ }
723
730
  openPopUp(e = null) {
724
731
  const popupElem = this.getPopUpElement();
725
732
  if (!this.target) {
@@ -1746,7 +1753,7 @@ let ProgressButton = class ProgressButton extends Button {
1746
1753
  this.step = args.step;
1747
1754
  if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
1748
1755
  this.timerId = requestAnimationFrame(() => {
1749
- if (this.enableProgress) {
1756
+ if (this.enableProgress && this.getProgress()) {
1750
1757
  this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
1751
1758
  }
1752
1759
  this.element.setAttribute('aria-valuenow', percent.toString());
@@ -1763,7 +1770,7 @@ let ProgressButton = class ProgressButton extends Button {
1763
1770
  else {
1764
1771
  this.interval = window.setTimeout(() => {
1765
1772
  this.progressTime = this.percent = 0;
1766
- if (this.enableProgress) {
1773
+ if (this.enableProgress && this.getProgress()) {
1767
1774
  this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
1768
1775
  }
1769
1776
  this.element.setAttribute('aria-valuenow', '0');
@@ -1803,7 +1810,7 @@ let ProgressButton = class ProgressButton extends Button {
1803
1810
  if (i > 100) {
1804
1811
  i = 100;
1805
1812
  }
1806
- if (this.enableProgress) {
1813
+ if (this.enableProgress && this.getProgress()) {
1807
1814
  this.getProgress().style[isVertical ? 'height' : 'width'] = (this.percent < 100) ? (i + '%') : '100%';
1808
1815
  }
1809
1816
  }