@syncfusion/ej2-splitbuttons 20.4.38 → 20.4.40

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.
@@ -338,7 +338,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
338
338
  this.dropDown.refreshPosition(this.element);
339
339
  }
340
340
  this.dropDown.hide();
341
- attributes(this.element, (_a = {}, _a['aria-haspopup'] = this.items.length || this.target ? 'true' : 'false', _a['aria-expanded'] = 'false', _a['aria-owns'] = this.getPopUpElement().id, _a['type'] = 'button', _a['aria-label'] = this.element.textContent ? this.element.textContent : 'dropdownbutton', _a));
341
+ attributes(this.element, (_a = {}, _a['aria-haspopup'] = this.items.length || this.target ? 'true' : 'false', _a['aria-expanded'] = 'false', _a['type'] = 'button', _a['aria-label'] = this.element.textContent ? this.element.textContent : 'dropdownbutton', _a));
342
342
  if (this.cssClass) {
343
343
  addClass([div], this.cssClass.split(' '));
344
344
  }
@@ -729,6 +729,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
729
729
  _this.dropDown.show(null, _this.element);
730
730
  addClass([_this.element], 'e-active');
731
731
  _this.element.setAttribute('aria-expanded', 'true');
732
+ _this.element.setAttribute('aria-owns', _this.getPopUpElement().id);
732
733
  if (ul_1) {
733
734
  ul_1.focus();
734
735
  }
@@ -742,12 +743,12 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
742
743
  if (e === void 0) { e = null; }
743
744
  var ul = this.getULElement();
744
745
  var beforeCloseArgs = { element: ul, items: this.items, event: e, cancel: false };
745
- var popupElement = this.getPopUpElement();
746
- if (popupElement) {
747
- EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
748
- }
749
746
  this.trigger('beforeClose', beforeCloseArgs, function (observedArgs) {
750
747
  if (!observedArgs.cancel) {
748
+ var popupElement = _this.getPopUpElement();
749
+ if (popupElement) {
750
+ EventHandler.remove(popupElement, 'keydown', _this.keyBoardHandler);
751
+ }
751
752
  _this.popupUnWireEvents();
752
753
  var ul_2 = _this.getULElement();
753
754
  var selectedLi = void 0;
@@ -760,6 +761,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
760
761
  _this.dropDown.hide();
761
762
  removeClass(_this.activeElem, 'e-active');
762
763
  _this.element.setAttribute('aria-expanded', 'false');
764
+ _this.element.removeAttribute('aria-owns');
763
765
  if (focusEle) {
764
766
  focusEle.focus();
765
767
  }
@@ -777,6 +779,11 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
777
779
  _this.isPopupCreated = _this.createPopupOnClick ? false : true;
778
780
  }
779
781
  }
782
+ else {
783
+ if (ul) {
784
+ ul.focus();
785
+ }
786
+ }
780
787
  });
781
788
  };
782
789
  DropDownButton.prototype.unWireEvents = function () {