fix: Keep terminal view out of the way of the keyboard on mobile views (#398)

This commit is contained in:
gsxdsm
2026-02-12 09:51:15 +02:00
committed by GitHub
parent 45a27512cc
commit 82a2da47bb
3 changed files with 28 additions and 2 deletions
@@ -206,6 +206,13 @@ export const MainLayout: React.FC = () => {
if (!active) {
return null;
}
const explicitTargetId = active.getAttribute('data-keyboard-avoid-target-id');
if (explicitTargetId) {
const explicitTarget = document.getElementById(explicitTargetId);
if (explicitTarget instanceof HTMLElement) {
return explicitTarget;
}
}
const markedTarget = active.closest('[data-keyboard-avoid]') as HTMLElement | null;
if (markedTarget) {
// data-keyboard-avoid="none" opts out of translateY avoidance entirely.