@syncfusion/ej2-lists 33.1.47 → 33.2.3

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.
@@ -4313,18 +4313,19 @@ let Sortable = Sortable_1 = class Sortable extends Base {
4313
4313
  if (dropInst.element.querySelector('.e-list-nrt')) {
4314
4314
  curIdx = curIdx - 1;
4315
4315
  }
4316
- const sortableTargetElement = this.getSortableElement(e.target, dropInst);
4316
+ const sortableTargetElement = this.getSortableElement(e.target, dropInst) || e.target.querySelector('.e-grabbed');
4317
+ const isDroppedOnContainer = dropInst.element === e.target && !sortableTargetElement;
4317
4318
  if (this.curTarget === this.target && sortableTargetElement === this.curTarget) {
4318
4319
  curIdx = prevIdx;
4319
4320
  }
4320
- if (dropInst.element === e.target || (!isPlaceHolderPresent && this.curTarget === this.target)) {
4321
+ if (isDroppedOnContainer || (!isPlaceHolderPresent && this.curTarget === this.target)) {
4321
4322
  const beforeDropArgs = {
4322
4323
  previousIndex: prevIdx, currentIndex: curIdx,
4323
4324
  target: e.target, droppedElement: this.target, helper: e.helper, cancel: false
4324
4325
  };
4325
4326
  this.trigger('beforeDrop', beforeDropArgs, (observedArgs) => {
4326
- if ((dropInst.element === e.target || (typeof e.target.className === 'string' && e.target.className.indexOf('e-list-nrt') > -1) || (typeof e.target.className === 'string' && e.target.className.indexOf('e-list-nr-template') > -1)
4327
- || e.target.closest('.e-list-nr-template')) && !observedArgs.cancel) {
4327
+ if ((isDroppedOnContainer || (typeof sortableTargetElement.className === 'string' && sortableTargetElement.className.indexOf('e-list-nrt') > -1) || (typeof sortableTargetElement.className === 'string' && sortableTargetElement.className.indexOf('e-list-nr-template') > -1)
4328
+ || sortableTargetElement.closest('.e-list-nr-template')) && !observedArgs.cancel) {
4328
4329
  this.updateItemClass(dropInst);
4329
4330
  dropInst.element.appendChild(this.target);
4330
4331
  this.trigger('drop', {