From 4c0f1afd324e8b598782a8fa62bfa5b8a21401ef Mon Sep 17 00:00:00 2001 From: RubaXa Date: Wed, 11 Feb 2015 19:12:00 +0300 Subject: [PATCH] #256: - _onDrag --- Sortable.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Sortable.js b/Sortable.js index 050e742..0e16a7d 100644 --- a/Sortable.js +++ b/Sortable.js @@ -407,7 +407,6 @@ _css(ghostEl, 'msTransform', translate3d); _css(ghostEl, 'transform', translate3d); - this._onDrag(touch); evt.preventDefault(); } }, @@ -492,9 +491,7 @@ !options.dragoverBubble && evt.stopPropagation(); } - _autoScroll(evt, options, this.el); - - if (!_silent && activeGroup && !options.disabled && + if (activeGroup && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) : activeGroup.pull && groupPut && ( @@ -504,6 +501,13 @@ ) && (evt.rootEl === void 0 || evt.rootEl === this.el) ) { + // Smart auto-scrolling + _autoScroll(evt, options, this.el); + + if (_silent) { + return; + } + target = _closest(evt.target, options.draggable, el); dragRect = dragEl.getBoundingClientRect();