@syncfusion/ej2-splitbuttons 23.1.43 → 24.1.41

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.
@@ -310,6 +310,8 @@ let DropDownButton = class DropDownButton extends Component {
310
310
  content: this.target ? this.getTargetElement() : '',
311
311
  enableRtl: this.enableRtl
312
312
  });
313
+ this.dropDown.element.setAttribute('role', 'dialog');
314
+ this.dropDown.element.setAttribute('aria-label', 'dropdown menu');
313
315
  if (!isNullOrUndefined(this.popupContent)) {
314
316
  this.popupContent.style.display = '';
315
317
  }
@@ -354,7 +356,7 @@ let DropDownButton = class DropDownButton extends Component {
354
356
  li = this.createElement('li', {
355
357
  innerHTML: item.url ? '' : tempItem,
356
358
  className: item.separator ? classNames.ITEM + ' ' + classNames.SEPARATOR : classNames.ITEM,
357
- attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
359
+ attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1', 'aria-label': 'separator', 'aria-hidden': 'true' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
358
360
  id: item.id ? item.id : getUniqueID('e-' + this.getModuleName() + '-item')
359
361
  });
360
362
  if (this.enableHtmlSanitizer) {
@@ -545,6 +547,12 @@ let DropDownButton = class DropDownButton extends Component {
545
547
  }
546
548
  EventHandler.add(this.element, 'click', this.clickHandler, this);
547
549
  EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
550
+ EventHandler.add(window, 'resize', this.windowResize, this);
551
+ }
552
+ windowResize() {
553
+ if (!this.canOpen() && this.dropDown) {
554
+ this.dropDown.refreshPosition(this.element);
555
+ }
548
556
  }
549
557
  popupWireEvents() {
550
558
  if (!this.delegateMousedownHandler) {
@@ -810,6 +818,7 @@ let DropDownButton = class DropDownButton extends Component {
810
818
  EventHandler.remove(this.getPopUpElement(), 'click', this.clickHandler);
811
819
  EventHandler.remove(this.getPopUpElement(), 'keydown', this.keyBoardHandler);
812
820
  }
821
+ EventHandler.remove(window, 'resize', this.windowResize);
813
822
  }
814
823
  /**
815
824
  * Called internally if any of the property value changed.
@@ -1196,13 +1205,20 @@ let SplitButton = class SplitButton extends DropDownButton {
1196
1205
  this.unWireEvents();
1197
1206
  }
1198
1207
  }
1199
- this.wrapper = null;
1200
1208
  this.primaryBtnObj.destroy();
1201
1209
  this.secondaryBtnObj.destroy();
1202
1210
  super.destroy();
1203
- if (!this.element.getAttribute('class')) {
1211
+ if (this.element && !this.element.getAttribute('class')) {
1204
1212
  this.element.removeAttribute('class');
1205
1213
  }
1214
+ if (this.refreshing && this.isAngular) {
1215
+ this.element = this.wrapper;
1216
+ ['e-control', 'e-split-btn', 'e-lib'].forEach((key) => {
1217
+ this.element.classList.add(key);
1218
+ });
1219
+ setValue('ej2_instances', [this], this.element);
1220
+ }
1221
+ this.wrapper = null;
1206
1222
  }
1207
1223
  wireEvents() {
1208
1224
  EventHandler.add(this.element, 'click', this.primaryBtnClickHandler, this);
@@ -1823,7 +1839,7 @@ let ProgressButton = class ProgressButton extends Button {
1823
1839
  }
1824
1840
  setAria() {
1825
1841
  attributes(this.element, {
1826
- 'aria-label': this.element.textContent + ' progress', 'aria-valuemin': '0', 'aria-valuemax': '100', 'aria-valuenow': '0'
1842
+ 'aria-label': this.element.textContent + ' progress'
1827
1843
  });
1828
1844
  }
1829
1845
  wireEvents() {