setReturnFocus's previouslyActiveElement is undefined, and returning false yields "setReturnFocus did not return a node"
See original GitHub issueThanks for the great work on this library! Seeing two unexpected errors in setReturnFocus
with focus-trap-react@8.11.2
.
Code like below:
<FocusTrap
focusTrapOptions={{
setReturnFocus: previouslyActiveElement => {
console.log(typeof previouslyActiveElement) // undefined
return false;
},
}}>
@stefcameron, any ideas?
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
focusNode returns undefined when selecting the whole element
I was able to recreate the problem, it happens when you select a line then the one just below by stopping before the...
Read more >focus-trap-react - Bountysource
setReturnFocus's previouslyActiveElement is undefined, and returning false yields "setReturnFocus did not return a node" $ 0. Created 6 months ago in focus-trap ...
Read more >focus-trap demo - GitHub Pages
If initialFocus is false (or a function that returns false ), no element ... When you tab through the trap, focus does not...
Read more >Promise returns undefined no matter how I await it? - Reddit
There's no getting it without the promise chain. That's why you have to return the chain from isSubbed. const isSubbed = () =>...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will be in v8.11.3 which will be published in ~5 minutes.
My pleasure! Yes, release will come soon.