From 6656e45f302469f37aa7da0f9b68d70ff0b2f100 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Tue, 16 Dec 2014 20:50:38 +0300 Subject: [PATCH] #166: fixed _onDragOver & group --- Sortable.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Sortable.js b/Sortable.js index 30dd630..0f87f82 100644 --- a/Sortable.js +++ b/Sortable.js @@ -105,7 +105,8 @@ dataTransfer.setData('Text', dragEl.textContent); } }, - group; + + group = options.group; // Set default options @@ -114,10 +115,9 @@ } - if (!options.group.name) { - options.group = { name: options.group }; + if (!group || typeof group != 'object') { + group = options.group = { name: group }; } - group = options.group; ['pull', 'put'].forEach(function (key) { @@ -450,7 +450,10 @@ isOwner = (activeGroup === group), canSort = options.sort; - (evt.stopPropagation !== void 0) && evt.stopPropagation(); + if (evt.preventDefault !== void 0) { + evt.preventDefault(); + evt.stopPropagation(); + } if (!_silent && activeGroup && (isOwner