From 2f80a32e153205e82a5439d18b1bfe645c9453c4 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 12 Mar 2020 13:54:15 +0100 Subject: [PATCH] Fix cursor not removed when another user leaves the kanban --- www/kanban/inner.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 536d82bf5..5a3655a3f 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -1127,9 +1127,12 @@ define([ var id = data.id; // Clear existing cursor - if (remoteCursors[id] && remoteCursors[id].clear) { - remoteCursors[id].clear(); - } + Object.keys(remoteCursors).forEach(function (_id) { + if (_id.indexOf(id) === 0 && remoteCursors[_id].clear) { + remoteCursors[_id].clear(); + delete remoteCursors[_id]; + } + }); delete remoteCursors[id]; var cursor = data.cursor;