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 17c2950
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/public/components/terminal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ 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 a textarea position update to fix this.
// See https://bugzilla.redhat.com/show_bug.cgi?id=1983220
// and https://github.com/xtermjs/xterm.js/issues/3390
terminal._core?._syncTextArea?.();
});
}

Expand Down

0 comments on commit 17c2950

Please sign in to comment.