@syncfusion/ej2-dropdowns 24.2.4 → 24.2.5

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.
@@ -11159,6 +11159,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11159
11159
  }
11160
11160
  }
11161
11161
  removelastSelection(e) {
11162
+ const selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);
11163
+ if (selectedElem !== null) {
11164
+ this.removeSelectedChip(e);
11165
+ return;
11166
+ }
11162
11167
  const elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1);
11163
11168
  const value = elements[elements.length - 1].getAttribute('data-value');
11164
11169
  if (!isNullOrUndefined(this.value)) {
@@ -13307,7 +13312,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13307
13312
  if (delim) {
13308
13313
  this.updateWrapperText(this.delimiterWrapper, data);
13309
13314
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
13310
- this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
13315
+ this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
13311
13316
  }
13312
13317
  const targetEle = e && e.target;
13313
13318
  const isClearAll = (targetEle && targetEle.classList.contains('e-close-hooker')) ? true : null;
@@ -14277,7 +14282,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14277
14282
  this.hiddenElement.innerHTML = hiddenValue;
14278
14283
  this.updateWrapperText(this.delimiterWrapper, wrapperText);
14279
14284
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
14280
- this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
14285
+ this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
14281
14286
  this.setProperties({ text: text.toString() }, true);
14282
14287
  this.refreshInputHight();
14283
14288
  this.refreshPlaceHolder();
@@ -14787,7 +14792,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14787
14792
  }
14788
14793
  });
14789
14794
  if (this.mode === 'Default' || this.mode === 'Box') {
14790
- this.inputElement.setAttribute('aria-labelledby', this.chipCollectionWrapper.id);
14795
+ this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
14791
14796
  }
14792
14797
  if (this.element.tagName !== this.getNgDirective()) {
14793
14798
  this.element.style.display = 'none';
@@ -18444,7 +18449,7 @@ let Mention = class Mention extends DropDownBase {
18444
18449
  rangetextContent = this.range.startContainer.textContent.split('');
18445
18450
  }
18446
18451
  let currentRange = this.getTextRange();
18447
- const lastWordRange = this.getLastLetter(currentRange);
18452
+ let lastWordRange = this.getLastLetter(currentRange);
18448
18453
  const lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
18449
18454
  // eslint-disable-next-line security/detect-non-literal-regexp
18450
18455
  const Regex = new RegExp(this.mentionChar.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g');
@@ -18474,7 +18479,9 @@ let Mention = class Mention extends DropDownBase {
18474
18479
  }
18475
18480
  return;
18476
18481
  }
18477
- this.queryString = lastWordRange.replace(this.mentionChar, '');
18482
+ if (lastWordRange.includes(this.mentionChar)) {
18483
+ this.queryString = lastWordRange.replace(this.mentionChar, '');
18484
+ }
18478
18485
  if (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) &&
18479
18486
  this.queryString !== '' && e.keyCode !== 38 && e.keyCode !== 40 && !this.lineBreak) {
18480
18487
  this.searchLists(e);