Repository navigation
Replies: 2 comments
|
The fact that the animation becomes smooth while a performance recording is active is an important diagnostic clue. It suggests that the issue may involve rendering, scheduling, or instrumentation overhead rather than just an incorrectly configured CSS transition. I wouldn't assume the root cause is Radix without isolating those variables. Here's how I would investigate it. 1. Reduce the reproduction to the smallest possible component. Test the official Radix Select with:
Compare DevTools open, closed, and recording. 2. Check for layout-sensitive animation properties. Animating Prefer 3. Capture evidence without relying on the DevTools recording UI. A Chromium trace or external system-level sampling can help distinguish:
The fact that recording changes the behavior means the profiler itself may affect timing. 4. Compare browsers and display conditions. Your Firefox and Safari results are valuable. I'd also check device scale factor, refresh rate, GPU acceleration, and whether the problem persists in a fresh Chromium profile. 5. Avoid premature workarounds. I wouldn't add global If you can share a minimal reproduction plus a short recording with and without DevTools, that would make it much easier to distinguish a Chromium-specific issue from a Radix positioning or animation regression. The behavior you described is worth investigating, especially because enabling the profiler changes the result. |
|
I had a look at the Select positioning code. One thing worth testing is whether the jank is related to the default In There's also a second positioning pass in some cases, for example when a scroll button mounts and changes the viewport layout. Source: https://github.com/radix-ui/primitives/blob/main/packages/react/select/src/select.tsx I'd compare these two configurations using the same Select items and styles: 1. Default positioning <Select.Content className="SelectContent">
<Select.Viewport>
{/* existing items */}
</Select.Viewport>
</Select.Content>2. Popper positioning <Select.Content
position="popper"
sideOffset={4}
className="SelectContent"
>
<Select.Viewport>
{/* existing items */}
</Select.Viewport>
</Select.Content>First test both without animations, then repeat with the same fade-in: .SelectContent[data-state="open"] {
animation: selectFadeIn 150ms ease-out;
}
@keyframes selectFadeIn {
from { opacity: 0; }
to { opacity: 1; }
}A few things I'd check:
The fact that starting a Performance recording makes the issue disappear is particularly interesting, but it doesn't necessarily establish whether the cause is Chromium or Radix. Recording itself can change runtime behavior. If switching to I haven't reproduced this on the reported Chrome/Edge versions, so I'd treat this as a way to isolate the cause rather than a confirmed fix. Radix docs: https://www.radix-ui.com/primitives/docs/components/select |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The Radix Select demo appears slightly janky while the dropdown opens when browser DevTools is open in Chromium-based browsers.
The effect is subtle with the official Select demo as-is, but becomes much more noticeable after adding a fade-in animation to the Select content.
Interestingly, starting a DevTools performance recording makes the issue disappear.
Reproduction steps
Observed behavior
Expected behavior
The Select dropdown should open smoothly regardless of whether DevTools is open, an animation is applied, or the browser is in private browsing mode.
Browser results
Environment
Additional context
The code used is the official Radix Select demo. No animation is required to observe a small amount of jank; the fade-in animation only makes it easier to see.
All reactions