fix: exclude xterm terminal from keyboard scroll handling

- Terminal has hidden textarea that was triggering scrollIntoView
- Exclude elements inside .xterm or .terminal-container
- Fixes scroll being broken when tapping terminal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-31 08:11:37 +01:00
co-authored by Claude Opus 4.5
parent 24af779d54
commit 8641296aa2
3 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -204,9 +204,15 @@ const KeyboardHandler = {
});
},
/** Check if element is an input that triggers keyboard */
/** Check if element is an input that triggers keyboard (excludes terminal) */
isInputElement(el) {
if (!el) return false;
// Exclude xterm.js terminal inputs (they handle their own scroll)
if (el.closest('.xterm') || el.closest('.terminal-container')) {
return false;
}
const tagName = el.tagName?.toLowerCase();
// Exclude type=range, type=checkbox, type=radio (don't trigger keyboard)
if (tagName === 'input') {