mirror of https://github.com/xwiki-labs/cryptpad
don't rely on 'info' in onRemote so we can call it anywhere
This commit is contained in:
parent
3e421c7289
commit
50277cb0ae
|
@ -646,7 +646,7 @@ define([
|
||||||
return cursor;
|
return cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
var onRemote = config.onRemote = function (info) {
|
var onRemote = config.onRemote = function () {
|
||||||
if (initializing) { return; }
|
if (initializing) { return; }
|
||||||
var scroll = editor.getScrollInfo();
|
var scroll = editor.getScrollInfo();
|
||||||
|
|
||||||
|
|
|
@ -475,12 +475,12 @@ define([
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var onRemote = realtimeOptions.onRemote = function (info) {
|
var onRemote = realtimeOptions.onRemote = function () {
|
||||||
if (initializing) { return; }
|
if (initializing) { return; }
|
||||||
|
|
||||||
var oldShjson = stringifyDOM(inner);
|
var oldShjson = stringifyDOM(inner);
|
||||||
|
|
||||||
var shjson = info.realtime.getUserDoc();
|
var shjson = module.realtime.getUserDoc();
|
||||||
|
|
||||||
// remember where the cursor is
|
// remember where the cursor is
|
||||||
cursor.update();
|
cursor.update();
|
||||||
|
@ -679,7 +679,7 @@ define([
|
||||||
module.users = info.userList.users;
|
module.users = info.userList.users;
|
||||||
module.realtime = info.realtime;
|
module.realtime = info.realtime;
|
||||||
|
|
||||||
var shjson = info.realtime.getUserDoc();
|
var shjson = module.realtime.getUserDoc();
|
||||||
|
|
||||||
var newPad = false;
|
var newPad = false;
|
||||||
if (shjson === '') { newPad = true; }
|
if (shjson === '') { newPad = true; }
|
||||||
|
|
|
@ -840,7 +840,7 @@ define([
|
||||||
return cursor;
|
return cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
var onRemote = config.onRemote = function (info) {
|
var onRemote = config.onRemote = function () {
|
||||||
if (initializing) { return; }
|
if (initializing) { return; }
|
||||||
var scroll = editor.getScrollInfo();
|
var scroll = editor.getScrollInfo();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue