Pyasma opened a new pull request, #64896:
URL: https://github.com/apache/airflow/pull/64896

   Closes: #64757
   
   ## Problem
   
   When switching to the **Logs** tab on a task instance with many log lines, 
`scrollIntoView()` was called on a sentinel `<div>` at the bottom of the log 
content. This API walks up the DOM tree and scrolls every scrollable ancestor 
until the target is visible — causing the details panel (and page) to scroll 
irreversibly, not just the log box itself.
   
   ## Fix
   
   Replace `scrollIntoView()` with a direct `scrollTop = scrollHeight` 
assignment on the log box element (`logBoxRef`). This only scrolls the log box 
itself, leaving all ancestor elements untouched.
   
   Also updated `useOffsetTop` to accept `RefObject<HTMLElement | null>` to 
align with the stricter ref types in newer React/TypeScript versions.
   
   ## Changes
   
   - `airflow/www/static/js/dag/details/taskInstance/Logs/LogBlock.tsx` — 
replaced `scrollIntoView` with direct `scrollTop` scroll; removed unused 
sentinel `<div>`
   - `airflow/www/static/js/utils/useOffsetTop.ts` — updated parameter type to 
`RefObject<HTMLElement | null>`
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes — Claude Code (claude-sonnet-4-6) following the 
[guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to