Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 3a8dff1

Browse files
committed
fix(sortable): propagare the context to the combined/wrapped callbacks
Closes #251
1 parent e0eb74d commit 3a8dff1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/sortable.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ angular.module('ui.sortable', [])
1919

2020
function combineCallbacks(first,second){
2121
if(second && (typeof second === 'function')) {
22-
return function(e, ui) {
23-
first(e, ui);
24-
second(e, ui);
22+
return function() {
23+
first.apply(this, arguments);
24+
second.apply(this, arguments);
2525
};
2626
}
2727
return first;
@@ -286,7 +286,7 @@ angular.module('ui.sortable', [])
286286
wrappers.helper = function (inner) {
287287
if (inner && typeof inner === 'function') {
288288
return function (e, item) {
289-
var innerResult = inner(e, item);
289+
var innerResult = inner.apply(this, arguments);
290290
item.sortable._isCustomHelperUsed = item !== innerResult;
291291
return innerResult;
292292
};

0 commit comments

Comments
 (0)