diff options
Diffstat (limited to 'apps/files/js/navigation.js')
-rw-r--r-- | apps/files/js/navigation.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/js/navigation.js b/apps/files/js/navigation.js index 02a0af2b369..acfda3b6ce8 100644 --- a/apps/files/js/navigation.js +++ b/apps/files/js/navigation.js @@ -283,8 +283,11 @@ * This method allows easy swapping of elements. */ swap: function (list, j, i) { - list[i].before(list[j]); - list[j].before(list[i]); + var before = function(node, insertNode) { + node.parentNode.insertBefore(insertNode, node); + } + before(list[i], list[j]); + before(list[j], list[i]); } }; |