[3.4.0] UI: Page scrollbars flash and content shifts sideways while hovering the task instance “Mark as” menu
Under which category would you file this issue?
Providers
Apache Airflow version
3.4.0
What happened and how to reproduce it?
On a task instance page, I open the ✓/✗ “Mark as” menu (Success / Failed). While it’s open, moving the mouse between the options makes a vertical scrollbar (and a horizontal one at the bottom) of the whole page flash in and out. Each time, the page content shifts about 7px to the left and back, so moving the mouse a lot makes the page shake.
Steps to reproduce:
Open a Dag, then click a task in the Grid. Click the ✓/✗ button in the task instance header. Move the mouse over and between “Success” and “Failed”.
What you think should happen instead?
The page stays still.
Operating System
Ubuntu 24.04.3 LTS (WSL2) on Windows 11 host
Deployment
Docker-Compose
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
- Browser: Chrome Version 157.0.8103.52 on Windows
- Display resolution: 2560 x 1440 (checked in other resolutions too and it's the same)
- Browser zoom level: 125%
- Window is: maximized
- Always show scrollbars: off
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
@pedro-cf I tried reproducing this on Airflow 3.4.0 (Chromium on Linux) following the steps on a task instance page with the "Mark as" (✓/✗) menu open, but wasn't able to reproduce the scrollbar flash or the 7px layout shift on my end.
Looking into the code, this might be environment-specific due to how different operating systems and viewport widths handle scrollbars:
- OS Scrollbar Behavior: Linux / macOS often default to overlay (0px layout width) scrollbars, whereas Windows 11 Chrome uses classic fixed-width scrollbars (~15px). If an element touches the viewport edge on Windows, the sudden appearance of the scrollbar gutter shrinks the viewport width and pushes page content sideways.
- Unportalled Tooltip: In
src/system-components/Tooltip.tsx,portalleddefaults toundefined, so<Portal disabled={!portalled}>renders<ChakraTooltip.Positioner>inline inside<Menu.Content>rather than attaching it todocument.body. When hovering over the options near the viewport boundary, that inline positioner might cause transient container overflow on narrower windows or specific zoom levels.
Video and screenshots
https://github.com/user-attachments/assets/39329512-8a19-4ba8-a408-a44fecd3ca3f
Could you share:
- Your display resolution and browser zoom level?
- Whether your browser window is maximized or tiled/split-screen?
- Whether you have "Always show scrollbars" turned on in Windows system settings?
This would help pinpoint whether portalling the tooltip (portalled={true}) resolves the overflow for your setup.
Thank you @SachinyadavAug20 for looking into this.
- Display resolution: 2560 x 1440 (checked in other resolutions too and the same bug still happens)
- Browser zoom level: 125% (changed the zoom level to 100% and the same bug still happens)
- Window is: maximized
- Always show scrollbars: off
Thank you @pedro-cf for sharing the detailed setup and video!
Although I couldn't reproduce the visual shift directly on my Linux setup (due to how Linux compositing and overlay scrollbars handle layout width differently), investigating the code along with your video helped pinpoint the exact cause:
The <Tooltip> inside MarkTaskInstanceAsButton.tsx (as well as MarkRunAsButton.tsx and MarkTaskGroupAsButton.tsx) was rendering unportalled because portalled was omitted (and defaults to undefined in src/system-components/Tooltip.tsx). This mounted the tooltip positioner inline within <Menu.Content> rather than attaching it to document.body, causing transient viewport overflow and scrollbar re-renders when hovering over the menu items.
I have submitted PR #77199 which explicitly portals these tooltips to document.body. Could you please test that PR and let us know whether the glitch is completely resolved on your setup?