Skip to content

fix(html): stabilize mobile keyboard viewport and background#1531

Open
someonegg wants to merge 1 commit into
tsl0922:mainfrom
someonegg:chore/pr-mobile-keyboard-viewport
Open

fix(html): stabilize mobile keyboard viewport and background#1531
someonegg wants to merge 1 commit into
tsl0922:mainfrom
someonegg:chore/pr-mobile-keyboard-viewport

Conversation

@someonegg

@someonegg someonegg commented Apr 23, 2026

Copy link
Copy Markdown

Summary

Stabilize terminal viewport and page background when mobile soft keyboard opens.
This issue affects mobile browsers in general.

Changes

  • Sync terminal container height/top with visualViewport changes
  • Update page background color to terminal theme background
  • Improve mobile viewport scrolling behavior for xterm container

Verification

  • Open ttyd on mobile browser
  • Focus input to trigger soft keyboard
  • Confirm viewport height/position and background remain stable

@someonegg someonegg force-pushed the chore/pr-mobile-keyboard-viewport branch from 4987314 to 61a72de Compare April 23, 2026 00:22
Filip-Kin pushed a commit to Filip-Kin/ttyd that referenced this pull request Apr 23, 2026
- Fix viewport with visualViewport API (from PR tsl0922#1531)
- Sync page background color with terminal theme (from PR tsl0922#1531)
- Fix lineHeight/letterSpacing layout recalculation (from PR tsl0922#1530)
- Add light/dark theme toggle with localStorage persistence
- Auto-detect mobile and use larger font size (16px vs 13px)
- Prevent browser pinch-zoom via viewport meta tag
- Hide scrollbars on touch devices
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.

1 participant