diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-12-21 12:03:34 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-12-21 12:03:34 +0100 |
commit | 6bcc77a7c6575bffd800b5a1d381966c59c1c04a (patch) | |
tree | 91cfc281d008ca55e6a5a81f66f532cc56ef25d8 | |
parent | 9e9b04737e41ce2a582afdb5decade5293ab115b (diff) | |
download | nextcloud-server-6bcc77a7c6575bffd800b5a1d381966c59c1c04a.tar.gz nextcloud-server-6bcc77a7c6575bffd800b5a1d381966c59c1c04a.zip |
Replace ChildNode.before with custom before helper
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-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]); } }; |