Skip to content

fix(html): add viewport meta tag for mobile browsers - #1564

Merged
tsl0922 merged 1 commit into
tsl0922:mainfrom
UTUBMIR:fix/mobile-viewport
Aug 12, 2026
Merged

fix(html): add viewport meta tag for mobile browsers#1564
tsl0922 merged 1 commit into
tsl0922:mainfrom
UTUBMIR:fix/mobile-viewport

Conversation

@UTUBMIR

@UTUBMIR UTUBMIR commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #1424

Adds <meta name="viewport" content="width=device-width, initial-scale=1"> to template.html to ensure proper scaling on mobile devices.

Currently, ttyd renders at a fixed width on mobile browsers, causing the terminal to be cropped and requiring horizontal scrolling. With this meta tag, the page scales correctly to fit the device viewport.

Before: Terminal is cropped in portrait mode on mobile.
After: Terminal scales to fit the viewport.

@UTUBMIR

UTUBMIR commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

CI fails, but not because of my changes - it fails without them too.

@tsl0922
tsl0922 merged commit 2922cb8 into tsl0922:main Aug 12, 2026
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display cropped on phone browsers

2 participants