Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: arrow hydration and svg offsetParent #2198

Merged
merged 4 commits into from Mar 2, 2023
Merged

Conversation

atomiks
Copy link
Collaborator

@atomiks atomiks commented Mar 2, 2023

While adding an example to the docs I found two problems:

  • SVG elements passed to platform.getOffsetParent should return window. If the floating element is inside a containing block, and is not itself a containing block, then the arrow is positioned relative to the containing block, not the floating element, which is wrong.
  • During SSR, there's a hydration warning about the style prop that should be suppressed in case the floating element is initially rendered (likely hidden with visibility: hidden). It seems like the React types don't have this prop on svg elements but it works.

@rollingversions
Copy link

rollingversions bot commented Mar 2, 2023

@floating-ui/dom (1.2.2 → 1.2.3)

Bug Fixes

  • fix(getOffsetParent): always return window for SVG elements

@floating-ui/react (0.20.0 → 0.20.1)

Bug Fixes

  • fix(FloatingArrow): ignore SSR hydration warnings

Packages With No Changes

The following packages have no user facing changes, so won't be released:

  • @floating-ui/core
  • @floating-ui/react-dom
  • @floating-ui/react-native
  • @floating-ui/vue

Edit changelogs

@netlify
Copy link

netlify bot commented Mar 2, 2023

Deploy Preview for vibrant-gates-22c214 canceled.

Name Link
🔨 Latest commit 5a108a0
🔍 Latest deploy log https://app.netlify.com/sites/vibrant-gates-22c214/deploys/6400065fe2f76b000754ede7

@atomiks atomiks merged commit 79ba1cb into master Mar 2, 2023
@atomiks atomiks deleted the fix/arrow-svg-ssr branch March 2, 2023 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant