Skip to content

Commit

Permalink
Call xterm internal _syncTextArea function
Browse files Browse the repository at this point in the history
As workaround to fix invalid textarea position when the user resize the browser window
  • Loading branch information
jerolimov committed Jul 17, 2021
1 parent 9f8e276 commit d943c2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/public/components/terminal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ class Terminal_ extends React.Component {
this.fitAddon.fit();
// update the pty
this.props.onResize(terminal.rows, terminal.cols);
// The internal xterm textarea was not repositioned when the window was resized.
// This workaround triggers an position update.
// See https://github.com/xtermjs/xterm.js/issues/3390
terminal._core?._syncTextArea?.();
});
}

Expand Down

0 comments on commit d943c2b

Please sign in to comment.