wterm's iOS Safari compatibility for text input, selection, and pasting.
Raw Developer Origin & Technical Request
GitHub Issue
Apr 17, 2026
Hi! Ok in my recent PR for my agent-of-empires project (github.com/njbrake/agent-of-...
I was trying to work through how to handle text selection and pasting from iOS. Do you have any tips or pointers on best practices for wterm on iOS? Here are the couple of issues I found (Claude output after hours of debugging):
## Problem
wterm's InputHandler creates a hidden textarea with styles that prevent it from working correctly on iOS Safari:
### 1. Textarea positioned at -9999px with pointerEvents: none
// input.js, InputHandler constructor
s.left = "-9999px";
s.pointerEvents = "none";
iOS Safari only opens the soft keyboard when a focused input/textarea is within the visual viewport. With left: -9999px, calling textarea.focus() does not open the keyboard. Similarly, pointerEvents: none prevents the textarea from receiving any touch events, making native paste impossible.
Workaround (consumer side): After term.init(), patch the textarea:
const ta = term.element.querySelector("textarea");
ta.style.left = "0";
ta.style.top = "0";
ta.style.pointerEvents = "auto";
Suggested fix: On touch-primary devices (matchMedia('(pointer: coarse)')), position the textarea at 0,0 instead of -9999px and set pointerEvents: auto. The textarea is already invisible via color: transparent; background: transparent; caretColor: transparent, so it won't be visually visible. Alternatively, expose the textarea element publicly so consumers can style it without querySelector hack...
Developer Debate & Comments
No active discussions extracted for this entry yet.
Frequently Asked Questions
Market intelligence mapped to wterm's iOS Safari compatibility for text input, selection, and pasting..
How is wterm's iOS Safari compatibility for text input, selection, and pasting. positioned in the market?
What are the foundational technologies related to wterm's iOS Safari compatibility for text input, selection, and pasting.?
Are there startups building around wterm's iOS Safari compatibility for text input, selection, and pasting.?
Engagement Signals
Cross-Market Term Frequency
Quantifies the cross-market adoption of foundational terms like InputHandler and hidden textarea by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.
SaaS Metrics