diff --git a/app/config.js b/app/config.js index 328647f38..85a9937db 100644 --- a/app/config.js +++ b/app/config.js @@ -26,6 +26,8 @@ angular.module('portainer') toastr.options.timeOut = 3000; + Terminal.applyAddon(fit); + $uibTooltipProvider.setTriggers({ 'mouseenter': 'mouseleave', 'click': 'click', diff --git a/app/docker/views/containers/console/containerConsoleController.js b/app/docker/views/containers/console/containerConsoleController.js index 03d42f11b..bf8adee6c 100644 --- a/app/docker/views/containers/console/containerConsoleController.js +++ b/app/docker/views/containers/console/containerConsoleController.js @@ -87,7 +87,8 @@ function ($scope, $transition$, Container, Image, EndpointProvider, Notification term.on('data', function (data) { socket.send(data); }); - term.open(document.getElementById('terminal-container'), true); + term.open(document.getElementById('terminal-container')); + term.focus(); term.resize(width, height); term.setOption('cursorBlink', true); term.fit(); diff --git a/package.json b/package.json index 24be875da..ce0db9958 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "splitargs": "github:deviantony/splitargs#~0.2.0", "toastr": "github:CodeSeven/toastr#~2.1.3", "ui-select": "~0.19.6", - "xterm": "~2.8.1" + "xterm": "^3.1.0" }, "devDependencies": { "autoprefixer": "^7.1.1", diff --git a/yarn.lock b/yarn.lock index 8a306fe51..bf5c37ead 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4483,9 +4483,9 @@ xtend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a" -xterm@~2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-2.8.1.tgz#3f6b939bcb8d015a1f247d66257102cb16a0b2e1" +xterm@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.1.0.tgz#7f7e1c8cf4b80bd881a4e8891213b851423e90c9" yargs@~3.10.0: version "3.10.0"