@syncfusion/ej2-dropdowns 21.1.38 → 21.1.39

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.
@@ -13655,7 +13655,10 @@ class CheckBoxSelection {
13655
13655
  className: 'e-list-parent e-ul e-reorder'
13656
13656
  });
13657
13657
  if (activeLiCount > 0) {
13658
- append(this.parent.ulElement.querySelectorAll('li.e-active'), ulEle);
13658
+ const activeListItems = this.parent.ulElement.querySelectorAll('li.e-active');
13659
+ activeListItems.forEach(item => {
13660
+ ulEle.appendChild(item);
13661
+ });
13659
13662
  remLi = this.parent.ulElement.querySelectorAll('li.e-active');
13660
13663
  addClass(remLi, 'e-reorder-hide');
13661
13664
  prepend([ulEle], this.parent.list);
@@ -14055,12 +14058,18 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14055
14058
  let scrollParent;
14056
14059
  let boundRect;
14057
14060
  const scrollMoved = 36;
14061
+ let scrollHeight = 10;
14062
+ if (this.itemTemplate && args.target) {
14063
+ scrollHeight = args.target.scrollHeight;
14064
+ }
14058
14065
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14059
14066
  const event = args.event;
14060
14067
  let wrapper;
14061
14068
  if (args.target && (args.target.classList.contains('e-listbox-wrapper') || args.target.classList.contains('e-list-item')
14069
+ || (args.target.parentElement && args.target.parentElement.classList.contains('e-list-item'))
14062
14070
  || args.target.classList.contains('e-filter-parent') || args.target.classList.contains('e-input-group'))) {
14063
14071
  if (args.target.classList.contains('e-list-item') || args.target.classList.contains('e-filter-parent')
14072
+ || (args.target.parentElement && args.target.parentElement.classList.contains('e-list-item'))
14064
14073
  || args.target.classList.contains('e-input-group')) {
14065
14074
  wrapper = args.target.closest('.e-listbox-wrapper');
14066
14075
  }
@@ -14075,23 +14084,16 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14075
14084
  }
14076
14085
  boundRect = scrollParent.getBoundingClientRect();
14077
14086
  if ((boundRect.y + scrollParent.offsetHeight) - (event.pageY + scrollMoved) < 1) {
14078
- scrollParent.scrollTop = scrollParent.scrollTop + 10;
14087
+ scrollParent.scrollTop = scrollParent.scrollTop + scrollHeight;
14079
14088
  }
14080
14089
  else if ((event.pageY - scrollMoved) - boundRect.y < 1) {
14081
- scrollParent.scrollTop = scrollParent.scrollTop - 10;
14090
+ scrollParent.scrollTop = scrollParent.scrollTop - scrollHeight;
14082
14091
  }
14083
14092
  }
14084
14093
  if (args.target === null) {
14085
14094
  return;
14086
14095
  }
14087
14096
  this.trigger('drag', this.getDragArgs(args));
14088
- const listObj = this.getComponent(args.target);
14089
- if (listObj && listObj.listData.length === 0) {
14090
- const noRecElem = listObj.ulElement.childNodes[0];
14091
- if (noRecElem) {
14092
- listObj.ulElement.removeChild(noRecElem);
14093
- }
14094
- }
14095
14097
  }
14096
14098
  beforeDragEnd(args) {
14097
14099
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
@@ -14124,6 +14126,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14124
14126
  if (Browser.isIos) {
14125
14127
  this.list.style.overflow = '';
14126
14128
  }
14129
+ const targetListObj = this.getComponent(args.target);
14130
+ if (targetListObj && targetListObj.listData.length === 0) {
14131
+ const noRecElem = targetListObj.ulElement.childNodes[0];
14132
+ if (noRecElem) {
14133
+ targetListObj.ulElement.removeChild(noRecElem);
14134
+ }
14135
+ }
14127
14136
  if (listObj === this) {
14128
14137
  const ul = this.ulElement;
14129
14138
  listData = [].slice.call(this.listData);
@@ -16601,6 +16610,12 @@ let Mention = class Mention extends DropDownBase {
16601
16610
  }
16602
16611
  }
16603
16612
  append([this.list], popupEle);
16613
+ if (this.inputElement.parentElement && this.inputElement.parentElement.parentElement &&
16614
+ this.inputElement.parentElement.parentElement.classList.contains('e-richtexteditor')) {
16615
+ if (popupEle.firstElementChild && popupEle.firstElementChild.childElementCount > 0) {
16616
+ popupEle.firstElementChild.setAttribute('aria-owns', this.inputElement.parentElement.parentElement.id);
16617
+ }
16618
+ }
16604
16619
  if ((!this.popupObj || !document.body.contains(this.popupObj.element)) ||
16605
16620
  !document.contains(popupEle) && isNullOrUndefined(this.target)) {
16606
16621
  document.body.appendChild(popupEle);