Fix focus loosing for last page element#20
Conversation
|
@faultyserver I tried to update my project too, but found this regression in 6.1. It was the reason why I was not able to use my focus-layers fix from #10 |
|
@faultyserver can we accept this small fix. I see warning from my #10 on every |
|
Hello! Sorry for such a delayed response. I'm not sure this is the approach that we'd want to take here. The focus-layers/src/useFocusLock.tsx Lines 98 to 108 in e36120d An example of where this wouldn't be wanted is if the user was using I think the brokenness that you're experiencing here is from not including Additionally, changing Hopefully that fixes the behavior you're seeing! If not, please let us know. |
There is a bug.
If the focus is on the last element of the page, by pressing Tab button, focus moves to the address bar of the browser. After then focus move to first focusable element of the page. Your hook tracks focus movement inside focus layer component. For this reason, focus trap stops working.
Also this example currently not works too.