Repository navigation
[Bugfix #517] Fix mobile duplicate letters and extra periods - #520
Merged
waleedkadous merged 2 commits intoFeb 22, 2026
Merged
Conversation
…cking + pointer:coarse The previous mobile input deduplication used a User Agent regex to detect mobile devices. This failed on iPads (iPadOS 13+ sends desktop UA) and lacked composition awareness. New approach uses two complementary triggers: 1. Composition event tracking on xterm's textarea — deduplicates during and shortly after IME composition (works on all platforms) 2. pointer:coarse media query — always-on dedup for touch devices, catching delayed duplicates outside the composition window This correctly handles iPads, Android tablets, and any soft keyboard device without affecting desktop key repeat.
- Restore original matchMedia in afterEach to prevent test isolation leak - Add comment documenting iPad + external keyboard tradeoff
waleedkadous
deleted the
builder/bugfix-517-mobile-duplicate-letters-and-e
branch
February 22, 2026 19:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #517
Root Cause
The previous mobile input deduplication used a User Agent regex (
/Android|iPhone|iPad|iPod/i) to detect mobile devices. This had two problems:Macintosh; Intel Mac OS X), so the regex never matched. The dedup was never activated on iPads.Fix
Replaced the UA-based approach with two complementary dedup triggers:
compositionstart/compositionendon xterm's textarea. Deduplicates during and within 150ms after IME composition. Works on ALL platforms (catches mobile + desktop CJK input).pointer:coarsemedia query — Always-on dedup for touch/soft-keyboard devices. Catches delayed duplicates that arrive outside the composition window (e.g. near line wraps). Correctly detects iPads, Android tablets, and any touch device.Key design choice: Using
(pointer: coarse)instead of UA sniffing correctly identifies soft-keyboard devices without false-positives on touch-screen laptops (which reportpointer: finesince mouse/trackpad is the primary pointer).Test Plan
CMAP Review