[FloatingFocusManager] Return focus to child element of reference #2825
Unanswered
adammiller
asked this question in
React
Replies: 1 comment 5 replies
-
Can't access the Sandbox, but the reference should be the focusable element itself. The wrapping probably works since |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Thanks for the great library. I'm facing an issue though with using it to build a Popover component. Here's an example:
https://codesandbox.io/p/sandbox/great-star-v5566y
The behavior I'd expect here is that the on close of the popover, focus would be returned to the input element. This works if I do not wrap the
input
element, but not if theinput
is wrapped in a div. If I give the div wrapper a tabIndex, it will return focus to the div, but that's not ideal.Is there some way of making this work as expected? Ideally, on close of the Popover, it'd return focus to the element that was focused before the Popover was open, as long as that element is inside the reference node.
Beta Was this translation helpful? Give feedback.
All reactions