@syncfusion/ej2-lists 33.1.44 → 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.
@@ -4389,17 +4389,19 @@ var Sortable = /** @__PURE__ @class */ (function (_super) {
4389
4389
  if (dropInst.element.querySelector('.e-list-nrt')) {
4390
4390
  curIdx = curIdx - 1;
4391
4391
  }
4392
- if (_this.curTarget === _this.target && e.target === _this.curTarget) {
4392
+ var sortableTargetElement = _this.getSortableElement(e.target, dropInst) || e.target.querySelector('.e-grabbed');
4393
+ var isDroppedOnContainer = dropInst.element === e.target && !sortableTargetElement;
4394
+ if (_this.curTarget === _this.target && sortableTargetElement === _this.curTarget) {
4393
4395
  curIdx = prevIdx;
4394
4396
  }
4395
- if (dropInst.element === e.target || (!isPlaceHolderPresent && _this.curTarget === _this.target)) {
4397
+ if (isDroppedOnContainer || (!isPlaceHolderPresent && _this.curTarget === _this.target)) {
4396
4398
  var beforeDropArgs = {
4397
4399
  previousIndex: prevIdx, currentIndex: curIdx,
4398
4400
  target: e.target, droppedElement: _this.target, helper: e.helper, cancel: false
4399
4401
  };
4400
4402
  _this.trigger('beforeDrop', beforeDropArgs, function (observedArgs) {
4401
- 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)
4402
- || e.target.closest('.e-list-nr-template')) && !observedArgs.cancel) {
4403
+ 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)
4404
+ || sortableTargetElement.closest('.e-list-nr-template')) && !observedArgs.cancel) {
4403
4405
  _this.updateItemClass(dropInst);
4404
4406
  dropInst.element.appendChild(_this.target);
4405
4407
  _this.trigger('drop', {