-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
area/keyboardarea/selectionhelp wantedtype/enhancementFeatures or improvements to existing featuresFeatures or improvements to existing featurestype/proposalA proposal that needs some discussion before proceedingA proposal that needs some discussion before proceeding
Description
Describe the bug
The terminal has limited support for touch interactions on mobile devices and touch screens. This severely impacts usability on mobile devices as users cannot effectively interact with the terminal using touch gestures and mobile-specific input methods.
To Reproduce
- Open xterm.js terminal on a mobile device or touch screen
- Try to interact with the terminal using:
- Touch gestures for scrolling
- Pinch-to-zoom
- Touch selection of text
- Long press for context menu
- Double tap for word selection
- Note that these interactions either don't work or fall back to basic mouse event translation
Expected behavior
The terminal should provide comprehensive touch support with:
- Native touch event handling instead of mouse event translation
- Support for common touch gestures:
- Single tap for cursor positioning
- Double tap for word selection
- Long press for context menu
- Two-finger pinch for zoom
- Two-finger scroll for terminal scrolling
- Touch-optimized text selection with:
- Selection handles
- Magnifying glass for precise cursor positioning
- Mobile-friendly context menu
- Proper integration with virtual keyboards and mobile keyboard accessories
Current behavior
- Touch interactions are limited or non-functional
- Mobile experience relies on browser's mouse event translation
- No native touch gesture support
- Text selection is difficult on touch devices
- Virtual keyboard integration is basic
- No mobile-optimized interface elements
Screenshots
No screenshots available - this is a feature limitation report
Environment
- OS: iOS 16+, Android 12+
- Browser: Safari iOS, Chrome Android, Firefox Android
- Device type: Mobile phones, tablets, touch-enabled laptops
- xterm.js version: Latest
Additional context
This affects all mobile and touch-enabled devices. Current implementation in CoreBrowserTerminal.ts focuses primarily on mouse and keyboard events, with no dedicated touch event handling.
Proposed Solution
- Implement TouchHandlingService for native touch event processing
- Add touch-specific configuration options to ITerminalOptions
- Enhance CoreBrowserTerminal with touch event bindings
- Add mobile-optimized UI elements for selection and interaction
- Improve virtual keyboard integration
See technical implementation details in the previous description for complete solution architecture.
Sammy-T and Taytay
Metadata
Metadata
Assignees
Labels
area/keyboardarea/selectionhelp wantedtype/enhancementFeatures or improvements to existing featuresFeatures or improvements to existing featurestype/proposalA proposal that needs some discussion before proceedingA proposal that needs some discussion before proceeding