mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-07-14 18:27:25 +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.open(terminalContainer);
|
||||||
term.fit();
|
|
||||||
|
|
||||||
|
// Set geometry during the next tick, to avoid race conditions.
|
||||||
|
setTimeout(function() {
|
||||||
$scope.resize(term.proposeGeometry());
|
$scope.resize(term.proposeGeometry());
|
||||||
|
}, 4);
|
||||||
|
|
||||||
term.on('data', function(d) {
|
term.on('data', function(d) {
|
||||||
$scope.socket.emit('terminal in', instance.name, d);
|
$scope.socket.emit('terminal in', instance.name, d);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user