@syncfusion/ej2-lists 29.1.34 → 29.1.40

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.
@@ -1,4 +1,4 @@
1
- import { isNullOrUndefined, getValue, extend, SanitizeHtmlHelper, prepend, merge, addClass, isVisible, attributes, append, compile, ChildProperty, Property, Component, detach, removeClass, formatUnit, animationMode, Animation, closest, EventHandler, Touch, remove, rippleEffect, Complex, Event, NotifyPropertyChanges, select, Base, isBlazor, getComponent, getUniqueID, Draggable, compareElementParent } from '@syncfusion/ej2-base';
1
+ import { isNullOrUndefined, getValue, extend, SanitizeHtmlHelper, prepend, merge, addClass, isVisible, attributes, append, compile, ChildProperty, Property, Component, detach, removeClass, formatUnit, animationMode, Animation, closest, EventHandler, Touch, remove, rippleEffect, Complex, Event, NotifyPropertyChanges, select, Base, Browser, getComponent, isBlazor, getUniqueID, Draggable, compareElementParent } from '@syncfusion/ej2-base';
2
2
  import { Query, DataManager } from '@syncfusion/ej2-data';
3
3
  import { createCheckBox } from '@syncfusion/ej2-buttons';
4
4
 
@@ -4205,6 +4205,11 @@ let Sortable = Sortable_1 = class Sortable extends Base {
4205
4205
  };
4206
4206
  this.onDragStart = (e) => {
4207
4207
  this.target = this.getSortableElement(e.target);
4208
+ if (isNullOrUndefined(this.target) && closest(this.element, '.e-listbox-container') && Browser.isDevice) {
4209
+ detach(e.dragElement);
4210
+ getComponent(this.element, 'draggable').intDestroy(e.event);
4211
+ return;
4212
+ }
4208
4213
  let cancelDrag = false;
4209
4214
  this.target.classList.add('e-grabbed');
4210
4215
  this.curTarget = this.target;
@@ -4254,7 +4259,9 @@ let Sortable = Sortable_1 = class Sortable extends Base {
4254
4259
  }
4255
4260
  dropInst.element.insertBefore(this.target, dropInst.placeHolderElement);
4256
4261
  const curIdx = this.getIndex(this.target, dropInst);
4257
- prevIdx = this === dropInst && (prevIdx - curIdx) >= 1 ? prevIdx - 1 : prevIdx;
4262
+ if (observedArgs.currentIndex > observedArgs.previousIndex) {
4263
+ prevIdx = this === dropInst && (prevIdx - curIdx) >= 1 ? prevIdx - 1 : prevIdx;
4264
+ }
4258
4265
  this.trigger('drop', {
4259
4266
  event: e.event, element: dropInst.element, previousIndex: prevIdx, currentIndex: curIdx,
4260
4267
  target: e.target, helper: e.helper, droppedElement: this.target, scopeName: this.scope, handled: handled