fix(ui): keep the app root pinned when the caret scrolls it
Chromium scrolls overflow:hidden ancestors when a textarea caret moves out of view (PageUp/PageDown in the prompt box, long prompts), shifting the whole app up and hiding the title bar with no way to scroll back. Snap html/body/#root back to zero on any root scroll event in the web, desktop, VS Code and mini-chat apps. Claude-Session: https://claude.ai/code/session_017TK5JAYDfT3Fotc23UEg98
This commit is contained in:
@@ -20,6 +20,7 @@ import { useWebNotificationStream } from '@/hooks/useWebNotificationStream';
|
||||
import { useAgentMemorySync } from '@/hooks/useAgentMemorySync';
|
||||
import { usePwaInstallPrompt } from '@/hooks/usePwaInstallPrompt';
|
||||
import { useWindowTitle } from '@/hooks/useWindowTitle';
|
||||
import { useRootScrollLock } from '@/hooks/useRootScrollLock';
|
||||
import { useConfigStore } from '@/stores/useConfigStore';
|
||||
import { isDesktopLocalOriginActive, isDesktopShell, restartDesktopApp, invokeDesktop } from '@/lib/desktop';
|
||||
import {
|
||||
@@ -717,6 +718,8 @@ function App({ apis }: AppProps) {
|
||||
|
||||
useWindowTitle();
|
||||
|
||||
useRootScrollLock();
|
||||
|
||||
useRouter();
|
||||
|
||||
const handleToggleMemoryDebug = React.useCallback(() => {
|
||||
|
||||
Reference in New Issue
Block a user