1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 01:57:32 +08:00

Merge pull request #44 from akalipetis/hotfix-xterm

Fix race conditions when initially resizing terminal
This commit is contained in:
Jonathan Leibiusky 2016-11-18 09:20:46 -03:00 committed by GitHub
commit bc7dbead33

View File

@ -204,9 +204,11 @@
});
term.open(terminalContainer);
term.fit();
$scope.resize(term.proposeGeometry());
// Set geometry during the next tick, to avoid race conditions.
setTimeout(function() {
$scope.resize(term.proposeGeometry());
}, 4);
term.on('data', function(d) {
$scope.socket.emit('terminal in', instance.name, d);