Skip to content

Commit 836c569

Browse files
fix(ui): ensure terminal takes full viewport height on all devices (freeCodeCamp#61423)
1 parent 878eafb commit 836c569

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.xterm-screen {
2+
height: 100vh !important;
3+
}

client/src/templates/Challenges/classic/xterm.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { FitAddon } from 'xterm-addon-fit';
44
import { useTranslation } from 'react-i18next';
55

66
import { registerTerminal } from '../utils/python-worker-handler';
7+
import './xterm.css';
78

89
const registerServiceWorker = async () => {
910
if ('serviceWorker' in navigator) {
@@ -35,6 +36,7 @@ export const XtermTerminal = ({
3536
const disposables: IDisposable[] = [];
3637
const { Terminal } = await import('xterm');
3738
const { FitAddon } = await import('xterm-addon-fit');
39+
3840
// Setting convertEol so that \n is converted to \r\n. Otherwise the terminal
3941
// will interpret \n as line feed and just move the cursor to the next line.
4042
// convertEol makes every \n a \r\n.

0 commit comments

Comments
 (0)