@syncfusion/ej2-lists 20.3.50 → 20.3.51

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.
@@ -1616,6 +1616,7 @@ let ListView = class ListView extends Component {
1616
1616
  }
1617
1617
  clickHandler(e) {
1618
1618
  const target = e.target;
1619
+ this.targetElement = target;
1619
1620
  const classList = target.classList;
1620
1621
  let closestElement;
1621
1622
  if (classList.contains(classNames.backIcon) || classList.contains(classNames.headerText)) {
@@ -1663,10 +1664,18 @@ let ListView = class ListView extends Component {
1663
1664
  }
1664
1665
  else {
1665
1666
  this.setCheckboxLI(li, e);
1667
+ if ((target.nodeName == "INPUT") || (target.nodeName == "TEXTAREA")) {
1668
+ target.classList.add('e-focused');
1669
+ this.targetElement = target;
1670
+ }
1666
1671
  }
1667
1672
  }
1668
1673
  else {
1669
1674
  this.setSelectLI(li, e);
1675
+ if ((target.nodeName == "INPUT") || (target.nodeName == "TEXTAREA")) {
1676
+ target.classList.add('e-focused');
1677
+ this.targetElement = target;
1678
+ }
1670
1679
  }
1671
1680
  closestElement = closest(e.target, 'li');
1672
1681
  if (!isNullOrUndefined(closestElement)) {
@@ -1893,11 +1902,7 @@ let ListView = class ListView extends Component {
1893
1902
  this.back();
1894
1903
  break;
1895
1904
  case 32:
1896
- let textAreaFocus;
1897
- if (!isNullOrUndefined(this.curUL)) {
1898
- textAreaFocus = this.curUL.querySelector('textarea') || this.curUL.querySelector('input');
1899
- }
1900
- if (isNullOrUndefined(textAreaFocus) || !(textAreaFocus.classList.contains('e-focused'))) {
1905
+ if (isNullOrUndefined(this.targetElement) || !(this.targetElement.classList.contains('e-focused'))) {
1901
1906
  this.spaceKeyHandler(e);
1902
1907
  }
1903
1908
  break;
@@ -4280,6 +4285,10 @@ let Sortable = Sortable_1 = class Sortable extends Base {
4280
4285
  });
4281
4286
  }
4282
4287
  }
4288
+ else if (this.curTarget !== this.target && this.scope && this.curTarget !== target && !isNullOrUndefined(newInst.placeHolder)) {
4289
+ remove(this.getSortableInstance(this.curTarget).placeHolderElement);
4290
+ this.curTarget = this.target;
4291
+ }
4283
4292
  newInst = this.getSortableInstance(this.curTarget);
4284
4293
  if (isNullOrUndefined(target) && e.target !== newInst.placeHolderElement) {
4285
4294
  if (this.isPlaceHolderPresent(newInst)) {