Merge pull request #3026 from storytouch/develop

Fix #2918. Re-enable editor after user is reconnected to server
This commit is contained in:
Luiza Pagliari 2016-07-21 15:42:38 -03:00 committed by GitHub
commit 81b11be54a
2 changed files with 8 additions and 0 deletions

View file

@ -769,6 +769,7 @@ var pad = {
var wasConnecting = (padconnectionstatus.getStatus().what == 'connecting'); var wasConnecting = (padconnectionstatus.getStatus().what == 'connecting');
if (newState == "CONNECTED") if (newState == "CONNECTED")
{ {
padeditor.enable();
padconnectionstatus.connected(); padconnectionstatus.connected();
} }
else if (newState == "RECONNECTING") else if (newState == "RECONNECTING")

View file

@ -198,6 +198,13 @@ var padeditor = (function()
self.ace = null; self.ace = null;
} }
}, },
enable: function()
{
if (self.ace)
{
self.ace.setEditable(true);
}
},
disable: function() disable: function()
{ {
if (self.ace) if (self.ace)