@syncfusion/ej2-dropdowns 20.4.51 → 20.4.52

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.
@@ -5134,7 +5134,9 @@ let DropDownTree = class DropDownTree extends Component {
5134
5134
  this.clickHandler(e);
5135
5135
  break;
5136
5136
  case 'moveDown':
5137
- this.treeObj.element.focus();
5137
+ let focusedElement = this.treeObj.element.querySelector('li');
5138
+ focusedElement.focus();
5139
+ addClass([focusedElement], ['e-hover', 'e-node-focus']);
5138
5140
  }
5139
5141
  }
5140
5142
  });
@@ -5807,7 +5809,9 @@ let DropDownTree = class DropDownTree extends Component {
5807
5809
  this.popupObj.refreshPosition();
5808
5810
  if (!(this.showCheckBox && this.showSelectAll) && (!this.popupDiv.classList.contains(NODATA)
5809
5811
  && this.treeItems.length > 0)) {
5810
- this.treeObj.element.focus();
5812
+ let focusedElement = this.treeObj.element.querySelector('li');
5813
+ focusedElement.focus();
5814
+ addClass([focusedElement], ['e-hover', 'e-node-focus']);
5811
5815
  }
5812
5816
  if (this.checkSelectAll && this.checkBoxElement) {
5813
5817
  const wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
@@ -16570,6 +16574,7 @@ let Mention = class Mention extends DropDownBase {
16570
16574
  }
16571
16575
  else {
16572
16576
  popupEle.style.left = formatUnit(coordinates.left);
16577
+ popupEle.style.top = formatUnit(coordinates.top - parseInt(this.popupHeight.toString()));
16573
16578
  this.isCollided = false;
16574
16579
  }
16575
16580
  popupEle.style.width = this.popupWidth !== '100%' && !isNullOrUndefined(this.popupWidth) ? formatUnit(this.popupWidth) : 'auto';
@@ -16598,7 +16603,8 @@ let Mention = class Mention extends DropDownBase {
16598
16603
  }
16599
16604
  checkCollision(popupEle) {
16600
16605
  if (!Browser.isDevice || (Browser.isDevice && !(this.getModuleName() === 'mention'))) {
16601
- const collision = isCollide(popupEle);
16606
+ let coordinates = this.getCoordinates(this.inputElement, this.getTriggerCharPosition());
16607
+ const collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
16602
16608
  if (collision.length > 0) {
16603
16609
  popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
16604
16610
  this.isCollided = true;
@@ -16622,7 +16628,7 @@ let Mention = class Mention extends DropDownBase {
16622
16628
  this.popupObj = new Popup(element, {
16623
16629
  width: this.setWidth(), targetType: 'relative',
16624
16630
  relateTo: this.inputElement, collision: { X: 'flip', Y: 'flip' }, offsetY: offsetValue,
16625
- enableRtl: this.enableRtl, offsetX: left, position: { X: 'top', Y: 'left' }, actionOnScroll: 'hide',
16631
+ enableRtl: this.enableRtl, offsetX: left, position: { X: 'left', Y: 'bottom' }, actionOnScroll: 'hide',
16626
16632
  zIndex: this.zIndex,
16627
16633
  close: () => {
16628
16634
  this.destroyPopup();
@@ -16704,14 +16710,14 @@ let Mention = class Mention extends DropDownBase {
16704
16710
  if (!this.isContentEditable(this.inputElement)) {
16705
16711
  coordinates = {
16706
16712
  top: rect.top + windowTop + span.offsetTop + parseInt(computed.borderTopWidth, 10) +
16707
- parseInt(computed.fontSize, 10) + 3 - element.scrollTop,
16713
+ parseInt(computed.fontSize, 10) + 3 - element.scrollTop - (this.isCollided ? 10 : 0),
16708
16714
  left: rect.left + windowLeft + span.offsetLeft + parseInt(computed.borderLeftWidth, 10)
16709
16715
  };
16710
16716
  document.body.removeChild(div);
16711
16717
  }
16712
16718
  else {
16713
16719
  coordinates = {
16714
- top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
16720
+ top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
16715
16721
  left: rect.left + windowLeft
16716
16722
  };
16717
16723
  }