提交 8d6aa11b 编写于 作者: D Daniel Imms

Sync scroll bar after panel is toggled

Fixes #12574
上级 cd837b47
......@@ -342,6 +342,12 @@ export class TerminalInstance implements ITerminalInstance {
}
if (!dimension.height) { // Minimized
return;
} else {
// Trigger scroll event manually so that the viewport's scroll area is synced. This
// needs to happen otherwise its scrollTop value is invalid when the panel is toggled as
// it gets removed and then added back to the DOM (resetting scrollTop to 0).
// Upstream issue: https://github.com/sourcelair/xterm.js/issues/291
this._xterm.emit('scroll', this._xterm.ydisp);
}
let leftPadding = parseInt(getComputedStyle(document.querySelector('.terminal-outer-container')).paddingLeft.split('px')[0], 10);
let innerWidth = dimension.width - leftPadding;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册