Fix OnlyOffice issues when reconnecting
parent
76ba55acbe
commit
49f9d872f4
|
@ -2668,16 +2668,22 @@ define([
|
|||
}
|
||||
|
||||
|
||||
// Only execute the following code the first time we call onReady
|
||||
if (!firstReady) {
|
||||
setMyId();
|
||||
oldHashes = JSON.parse(JSON.stringify(content.hashes));
|
||||
initializing = false;
|
||||
return void setEditable(!readOnly);
|
||||
}
|
||||
firstReady = false;
|
||||
|
||||
|
||||
var useNewDefault = content.version && content.version >= 2;
|
||||
openRtChannel(function () {
|
||||
setMyId();
|
||||
oldHashes = JSON.parse(JSON.stringify(content.hashes));
|
||||
initializing = false;
|
||||
|
||||
// Only execute the following code the first time we call onReady
|
||||
if (!firstReady) { return void setEditable(!readOnly); }
|
||||
firstReady = false;
|
||||
|
||||
common.openPadChat(APP.onLocal);
|
||||
|
||||
if (!readOnly) {
|
||||
|
@ -2836,10 +2842,12 @@ define([
|
|||
common.gotoURL();
|
||||
});
|
||||
}
|
||||
setEditable(true);
|
||||
//setEditable(true);
|
||||
try { getEditor().asc_setViewMode(false); } catch (e) {}
|
||||
offline = false;
|
||||
} else {
|
||||
setEditable(false);
|
||||
try { getEditor().asc_setViewMode(true); } catch (e) {}
|
||||
//setEditable(false);
|
||||
offline = true;
|
||||
UI.findOKButton().click();
|
||||
UIElements.disconnectAlert();
|
||||
|
|
Loading…
Reference in New Issue