From b3e57a013f149e2b946d99e905b20e00895b82e6 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 1 May 2018 11:18:39 +0300 Subject: [PATCH] Fix join channel ui moving when sorting channels Fixes #2218 --- client/js/socket-events/sync_sort.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/js/socket-events/sync_sort.js b/client/js/socket-events/sync_sort.js index c8f779c6..8910cbf7 100644 --- a/client/js/socket-events/sync_sort.js +++ b/client/js/socket-events/sync_sort.js @@ -18,7 +18,7 @@ socket.on("sync_sort", function(data) { if (type === "networks") { $.each(order, function(index, value) { - const position = $(container.children()[index]); + const position = $(container.children(".network")[index]); if (position.data("id") === value) { // Network in correct place return true; // No point in continuing @@ -32,7 +32,7 @@ socket.on("sync_sort", function(data) { return true; // same as `continue` -> skip to next item } - const position = $(network.children()[index]); // Target channel at position + const position = $(network.children(".chan")[index]); // Target channel at position if (position.data("id") === value) { // Channel in correct place return true; // No point in continuing