|  | 
| 364 | 364 | 		_prepareGroup = function (options) { | 
| 365 | 365 | 			function toFn(value, pull) { | 
| 366 | 366 | 				return function(to, from, dragEl, evt) { | 
| 367 |  | -					var ret; | 
| 368 | 367 | 					var sameGroup = to.options.group.name && | 
| 369 | 368 | 									from.options.group.name && | 
| 370 | 369 | 									to.options.group.name === from.options.group.name; | 
|  | 
| 378 | 377 | 					} else if (pull && value === 'clone') { | 
| 379 | 378 | 						return value; | 
| 380 | 379 | 					} else if (typeof value === 'function') { | 
| 381 |  | -						return toFn(value(to, from, dragEl, evt)); | 
|  | 380 | +						return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt); | 
| 382 | 381 | 					} else { | 
| 383 | 382 | 						var otherGroup = (pull ? to : from).options.group.name; | 
| 384 | 383 | 
 | 
|  | 
| 860 | 859 | 
 | 
| 861 | 860 | 			if (!this.nativeDraggable || touch) { | 
| 862 | 861 | 				if (this.options.supportPointer) { | 
| 863 |  | -					touch && _on(document, 'touchmove', _preventScroll); // must be touchmove to prevent scroll | 
| 864 | 862 | 					_on(document, 'pointermove', this._onTouchMove); | 
| 865 | 863 | 				} else if (touch) { | 
| 866 |  | -					_on(document, 'touchmove', _preventScroll); | 
| 867 | 864 | 					_on(document, 'touchmove', this._onTouchMove); | 
| 868 | 865 | 				} else { | 
| 869 | 866 | 					_on(document, 'mousemove', this._onTouchMove); | 
|  | 
| 1362 | 1359 | 		_offUpEvents: function () { | 
| 1363 | 1360 | 			var ownerDocument = this.el.ownerDocument; | 
| 1364 | 1361 | 
 | 
| 1365 |  | -			_off(document, 'touchmove', _preventScroll); | 
| 1366 |  | -			_off(document, 'pointermove', _preventScroll); | 
| 1367 | 1362 | 			_off(document, 'touchmove', this._onTouchMove); | 
| 1368 | 1363 | 			_off(document, 'pointermove', this._onTouchMove); | 
| 1369 | 1364 | 			_off(ownerDocument, 'mouseup', this._onDrop); | 
|  | 
| 2178 | 2173 | 	} | 
| 2179 | 2174 | 
 | 
| 2180 | 2175 | 
 | 
| 2181 |  | -	function _preventScroll(evt) { | 
| 2182 |  | -		if ((Sortable.active || awaitingDragStarted) && evt.cancelable) { | 
| 2183 |  | -			evt.preventDefault(); | 
| 2184 |  | -		} | 
| 2185 |  | -	} | 
| 2186 |  | - | 
| 2187 | 2176 | 	/** | 
| 2188 | 2177 | 	 * Returns the "bounding client rect" of given element | 
| 2189 | 2178 | 	 * @param  {HTMLElement} el                The element whose boundingClientRect is wanted | 
|  | 
| 2302 | 2291 | 		return false; | 
| 2303 | 2292 | 	} | 
| 2304 | 2293 | 
 | 
|  | 2294 | +	// Fixed #973: | 
|  | 2295 | +	_on(document, 'touchmove', function(evt) { | 
|  | 2296 | +		if ((Sortable.active || awaitingDragStarted) && evt.cancelable) { | 
|  | 2297 | +			evt.preventDefault(); | 
|  | 2298 | +		} | 
|  | 2299 | +	}); | 
|  | 2300 | + | 
| 2305 | 2301 | 
 | 
| 2306 | 2302 | 	// Export utils | 
| 2307 | 2303 | 	Sortable.utils = { | 
|  | 
| 2336 | 2332 | 
 | 
| 2337 | 2333 | 
 | 
| 2338 | 2334 | 	// Export | 
| 2339 |  | -	Sortable.version = '1.8.0'; | 
|  | 2335 | +	Sortable.version = '1.8.1'; | 
| 2340 | 2336 | 	return Sortable; | 
| 2341 | 2337 | }); | 
0 commit comments