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:
commit
bc7dbead33
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user