A JavaScript library to position floating elements and create interactions for them.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] over 2 years ago
fix(useHover): clear pointer-events: none
style when enabled
prop changes, or if the cursor is outside the safe polygon. Further, prevent adding it if the open event was not caused by hovering when using multiple open state-changing hooks like useFocus
. (#1808)
A hide delay meant outside interaction was not possible until it was dismissed via pointerdown or escape during the delay.
Published by github-actions[bot] over 2 years ago
@floating-ui/core
bumped to 1.0.0
(#1796)name
for middleware array comparisons (#1796)Published by github-actions[bot] over 2 years ago
@floating-ui/react-dom
bumped to 1.0.0
(#1796)fix(useDismiss): prevent bubbles: false
failing to close lower level nested floating elements on pointerdown
outside (#1797)
fix: useClick + useHover behavior when both hooks are used in conjunction (#1802)
use-isomorphic-layout-effect
from installed deps (#1796)Published by github-actions[bot] over 2 years ago
@floating-ui/core
bumped to 1.0.0
(#1796)
UMD package files now have .umd
in the filename (#1796)
fix: allow unstable inline ref callbacks (#1796)
fix: check name
for middleware array comparisons (#1796)
use-isomorphic-layout-effect
from installed deps (#1796)Published by github-actions[bot] over 2 years ago
@floating-ui/core
bumped to 1.0.0
(#1796)Published by github-actions[bot] over 2 years ago
limitShift
offset
function option now gets whole MiddlewareArguments
object spread in to match other APIs (#1796)apply
function now has await
before it to allow async updates (#1796)Published by github-actions[bot] over 2 years ago
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 the max-height
of the floating element.
feat: useInnerOffset
interaction hook — allows the height of the floating element to expand on wheel
event by changing the offset
that inner
uses to anchor the inner element (#1758)
FloatingFocusManager
. useListNavgation
and useDismiss
no longer return focus, bypassing issues with unmounting animations. (#1765)fix(useDismiss): outsidePointerDown
now uses real pointerdown
instead of mousedown
(#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 uses mousedown
instead of pointerdown
. 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)
Published by github-actions[bot] over 2 years ago
pointerdown
, which occurs when the reference element is no longer visible on the screen (i.e. the user scrolled away while a popover was open, then clicked outside it to dismiss it). (#1752)Published by github-actions[bot] over 2 years ago
ResizeObserver
) due to a timing problem with .focus
calls being invoked before the position is ready. (#1755)Published by github-actions[bot] over 2 years ago
fix: store real DOM reference in place of refs.reference
. Now you can use virtual elements for positioning without affecting the logic of the interaction hooks which expect a real DOM element. (#1748)
fix(useHover): 0 close delay not clearing open timeout (#1749)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
fix(useClick): if the initial open state is true, clicking the reference element to toggle it closed now works without two clicks (#1743)
fix(types): useFloatingPortalNode
return type (#1735)
TS typedefs are now generated as "strict" (#1735)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
TS typedefs are now generated as "strict" (#1735)
fix: add safeguard return to bail out of positioning after 50 reset requests, preventing any infinite loops, even if more resets are requested. In DEV mode, the error about the positioning loop is now just a warning. (#1742)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
fix(FloatingPortal): useFloatingPortalNode
uses state instead of a ref to ensure a re-render is triggered (#1715)
fix: add missing react
and react-dom
peer dependencies in package.json (#1727)
fix(FloatingFocusManager): shift+tab
outside reference element closes floating element (#1723)
fix(useHover): block pointer-events
when using safePolygon
(#1724)
As a result, the DropdownMenu
CodeSandbox example now no longer needs to block sibling list items' pointer-events
to prevent other submenus from opening as the cursor traverses the polygon.
fix(useFocus): pointerDown
on reference, then shift+tab outside the reference when it was first in the focus order (window blurred) now runs the focus handler when tabbing back into it (#1732)
fix(useClick): enabling pointerDown
no longer responds to right click or other mouse buttons, only the "main" button (#1732)
fix(FloatingFocusManager/useClick): improve isInputCombobox()
check by checking for typeability (incl. textarea
and contenteditable
elements). In addition, a Space keyboard handler is no longer added for useClick()
when the reference is typeable (#1732)
Published by github-actions[bot] over 2 years ago
elements
in MiddlewareArguments
signatures (#1733)Published by github-actions[bot] over 2 years ago
fix(types): prevent importing non-exported types in dom
from core
(#1731)
Published by github-actions[bot] over 2 years ago
fix(useListNavigation): set index to null
if out of bounds (#1702)
aria-activedescendant
is now removed by default when the index escapes the list
fix(useHover): clear timeouts on unmount to prevent React warning in <18 (#1707)
fix(FloatingFocusManager): add aria-hidden
handling for comboboxes to allow them to be portalled and accessible to touch-based screen readers (#1706)
@floating-ui/react-dom
to reduce initial re-renders (#1700)