当 `getTargetRect` 为具有 `position: fixed` 的目标返回一个 `DOMRect` 时,`useOverlayPosition` 会抛出异常,且覆盖图层的包含块不是视口
作者: cescox创建于 2026年9月25日更新于 2026年9月30日
标签Overlays
I use `getTargetRect` to position a dropdown against a rect built from two elements. With a `position: fixed` trigger and the dropdown portalled under a transformed ancestor, the render crashes. For now I copy the rect into a plain object before returning it.
内容来源: adobe/react-spectrum