From f56ea10fb0833efa9a4d6e3fcae1bc9c18df0a3e Mon Sep 17 00:00:00 2001 From: CHaBou Date: Mon, 15 Jan 2018 23:22:54 +0100 Subject: [PATCH] Fix offscreen term size calculation (#2612) * Fix offscreen term size calculation * Use positioning rather than opacity --- lib/components/terms.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/components/terms.js b/lib/components/terms.js index 4d83c8fe..4af44480 100644 --- a/lib/components/terms.js +++ b/lib/components/terms.js @@ -151,13 +151,16 @@ export default class Terms extends Component { }, termGroup: { - display: 'none', + display: 'block', width: '100%', - height: '100%' + height: '100%', + position: 'absolute', + top: '100%', // Offscreen to pause xterm rendering, thanks to IntersectionObserver + left: 0 }, termGroupActive: { - display: 'block' + top: 0 } }; }