@syncfusion/ej2-dropdowns 24.2.4 → 24.2.6

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.
@@ -2730,15 +2730,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2730
2730
  DropDownList.prototype.focusOutAction = function (e) {
2731
2731
  this.isInteracted = false;
2732
2732
  this.focusOut(e);
2733
- this.onFocusOut();
2733
+ this.onFocusOut(e);
2734
2734
  };
2735
- DropDownList.prototype.onFocusOut = function () {
2735
+ DropDownList.prototype.onFocusOut = function (e) {
2736
2736
  if (!this.enabled) {
2737
2737
  return;
2738
2738
  }
2739
2739
  if (this.isSelected) {
2740
2740
  this.isSelectCustom = false;
2741
- this.onChangeEvent(null);
2741
+ this.onChangeEvent(e);
2742
2742
  }
2743
2743
  this.floatLabelChange();
2744
2744
  this.dispatchEvent(this.hiddenElement, 'change');
@@ -3451,7 +3451,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3451
3451
  this.hidePopup(e);
3452
3452
  this.isInteracted = false;
3453
3453
  if (!isActive) {
3454
- this.onFocusOut();
3454
+ this.onFocusOut(e);
3455
3455
  this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
3456
3456
  }
3457
3457
  }
@@ -11388,6 +11388,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11388
11388
  }
11389
11389
  };
11390
11390
  MultiSelect.prototype.removelastSelection = function (e) {
11391
+ var selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);
11392
+ if (selectedElem !== null) {
11393
+ this.removeSelectedChip(e);
11394
+ return;
11395
+ }
11391
11396
  var elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1);
11392
11397
  var value = elements[elements.length - 1].getAttribute('data-value');
11393
11398
  if (!isNullOrUndefined(this.value)) {
@@ -13543,7 +13548,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13543
13548
  if (delim) {
13544
13549
  this.updateWrapperText(this.delimiterWrapper, data);
13545
13550
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
13546
- this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
13551
+ this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
13547
13552
  }
13548
13553
  var targetEle = e && e.target;
13549
13554
  var isClearAll = (targetEle && targetEle.classList.contains('e-close-hooker')) ? true : null;
@@ -14517,7 +14522,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14517
14522
  this.hiddenElement.innerHTML = hiddenValue;
14518
14523
  this.updateWrapperText(this.delimiterWrapper, wrapperText);
14519
14524
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
14520
- this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
14525
+ this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
14521
14526
  this.setProperties({ text: text.toString() }, true);
14522
14527
  this.refreshInputHight();
14523
14528
  this.refreshPlaceHolder();
@@ -15033,7 +15038,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15033
15038
  }
15034
15039
  });
15035
15040
  if (this.mode === 'Default' || this.mode === 'Box') {
15036
- this.inputElement.setAttribute('aria-labelledby', this.chipCollectionWrapper.id);
15041
+ this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
15037
15042
  }
15038
15043
  if (this.element.tagName !== this.getNgDirective()) {
15039
15044
  this.element.style.display = 'none';
@@ -17545,7 +17550,6 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
17545
17550
  if (tListBox.mainList.childElementCount !== tListBox.jsonData.length) {
17546
17551
  tListBox.mainList = tListBox.ulElement;
17547
17552
  }
17548
- fListBox.updateMainList();
17549
17553
  var tJsonData = [].slice.call(tListBox.jsonData);
17550
17554
  tSortData = [].slice.call(tListBox.sortedData);
17551
17555
  this.selectNextList(elems, dataLiIdx, dataIdx, fListBox);
@@ -18801,7 +18805,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
18801
18805
  }
18802
18806
  return;
18803
18807
  }
18804
- this.queryString = lastWordRange.replace(this.mentionChar, '');
18808
+ if (lastWordRange.includes(this.mentionChar)) {
18809
+ this.queryString = lastWordRange.replace(this.mentionChar, '');
18810
+ }
18805
18811
  if (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) &&
18806
18812
  this.queryString !== '' && e.keyCode !== 38 && e.keyCode !== 40 && !this.lineBreak) {
18807
18813
  this.searchLists(e);
@@ -19347,6 +19353,20 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
19347
19353
  range.collapse(false);
19348
19354
  rect = range.getBoundingClientRect().top === 0 ? range.startContainer.getClientRects()[0] : range.getBoundingClientRect();
19349
19355
  }
19356
+ var rectTop = rect.top;
19357
+ var rectLeft = rect.left;
19358
+ var iframes = document.querySelectorAll('iframe');
19359
+ if (iframes.length > 0) {
19360
+ for (var i = 0; i < iframes.length; i++) {
19361
+ // eslint-disable-next-line security/detect-object-injection
19362
+ var iframe = iframes[i];
19363
+ if (iframe.contentDocument.contains(element)) {
19364
+ var iframeRect = iframe.getBoundingClientRect();
19365
+ rectTop += iframeRect.top;
19366
+ rectLeft += iframeRect.left;
19367
+ }
19368
+ }
19369
+ }
19350
19370
  var doc = document.documentElement;
19351
19371
  var windowLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
19352
19372
  var windowTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
@@ -19368,23 +19388,23 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
19368
19388
  }
19369
19389
  if (!this.isContentEditable(this.inputElement)) {
19370
19390
  coordinates = {
19371
- top: rect.top + windowTop + span.offsetTop + parseInt(computed.borderTopWidth, 10) +
19391
+ top: rectTop + windowTop + span.offsetTop + parseInt(computed.borderTopWidth, 10) +
19372
19392
  parseInt(computed.fontSize, 10) + 3 - element.scrollTop - (this.isCollided ? 10 : 0),
19373
- left: rect.left + windowLeft + span.offsetLeft + parseInt(computed.borderLeftWidth, 10)
19393
+ left: rectLeft + windowLeft + span.offsetLeft + parseInt(computed.borderLeftWidth, 10)
19374
19394
  };
19375
19395
  document.body.removeChild(div);
19376
19396
  }
19377
19397
  else {
19378
19398
  if (this.collision && this.collision.length > 0 && this.collision.indexOf('right') > -1 && this.collision.indexOf('bottom') === -1) {
19379
19399
  coordinates = {
19380
- top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
19381
- left: rect.left + windowLeft + width
19400
+ top: rectTop + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
19401
+ left: rectLeft + windowLeft + width
19382
19402
  };
19383
19403
  }
19384
19404
  else {
19385
19405
  coordinates = {
19386
- top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
19387
- left: rect.left + windowLeft + width
19406
+ top: rectTop + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
19407
+ left: rectLeft + windowLeft + width
19388
19408
  };
19389
19409
  }
19390
19410
  }