New Features
-
feat:
inner
middleware — the floating element is anchored such that an inner element inside of it sits on top of/is anchored to the reference element. (#1758)This works along the
y
-axis and simulaneously limits themax-height
of the floating element. -
feat:
useInnerOffset
interaction hook — allows the height of the floating element to expand onwheel
event by changing theoffset
thatinner
uses to anchor the inner element (#1758)
Refactors
- refactor: returning focus to the reference element is now exclusively handled via
FloatingFocusManager
.useListNavgation
anduseDismiss
no longer return focus, bypassing issues with unmounting animations. (#1765)
Bug Fixes
-
fix(useDismiss):
outsidePointerDown
now uses realpointerdown
instead ofmousedown
(#1765)Before it required an "intentional" dismiss on touch devices, but now, the user can dismiss while attempting to scroll away
-
fix(useHover): prevent SVG reference element from failing to apply
pointer-events
auto styles (#1794) -
fix(useClick):
pointerDown
now usesmousedown
instead ofpointerdown
. This reduces unintentional clicks while touching the screen to scroll, or focus being moved to focusable items inside a floating element unintentionally when tapping the reference element. (#1765)