From a68a225d798b79791dbd0ee318fc4ab894c3bee0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 31 Jul 2017 12:21:48 +0200 Subject: [PATCH] fix read-only synchronization bug --- www/common/toolbar2.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/common/toolbar2.js b/www/common/toolbar2.js index 34dca996e..6ebc55999 100644 --- a/www/common/toolbar2.js +++ b/www/common/toolbar2.js @@ -687,6 +687,14 @@ define([ config.realtime.onPatch(ks(toolbar, config)); config.realtime.onMessage(ks(toolbar, config, true)); } + // without this, users in read-only mode say 'synchronizing' until they + // receive a patch. + if (Cryptpad) { + typing = 0; + Cryptpad.whenRealtimeSyncs(config.realtime, function () { + kickSpinner(toolbar, config); + }); + } return $spin; };