Skip to content

Commit

Permalink
Merge pull request SortableJS#1384 from chinacoolboyzz/master
Browse files Browse the repository at this point in the history
Modify the onChoose event firing order to allow for getting element information before chosenClass is applied
  • Loading branch information
owen-m1 authored Nov 8, 2018
2 parents 1bdd609 + a9d8eb4 commit bebf1f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,15 +434,15 @@

// Make the element draggable
dragEl.draggable = _this.nativeDraggable;

// Chosen item
_toggleClass(dragEl, options.chosenClass, true);


// Bind the events: dragstart/dragend
_this._triggerDragStart(evt, touch);

// Drag start event
_dispatchEvent(_this, rootEl, 'choose', dragEl, rootEl, rootEl, oldIndex);

// Chosen item
_toggleClass(dragEl, options.chosenClass, true);
};

// Disable "draggable"
Expand Down

0 comments on commit bebf1f6

Please sign in to comment.