-
Notifications
You must be signed in to change notification settings - Fork 15
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
Route with keepAlive: true does not fire its focus hook when coming back to the kept alive instance #221
Comments
hey @ChrisArasin, the Portal page in the Blits example page has keep alive on it and it seems to work properly wiht passing the focus back to the previously focused item. It fires the focus hook on the item that was focused before navigating, but it indeed does not fire a focus event on the parent (or grand grand parents) of the item component. Can you provide some details / examples how a focus event on the parent page (or other parent components) would be necessary ? |
Ah I see, was expecting to see the focus event fire from top down... I've got a page using something based on the If only the child focused element has focus fire when returning to the page, the The main thing I noticed was my focus state on the child element not displaying. Oddly enough it seems like even though I see the focus hook fire, Can see here, if you press |
Hey @ChrisArasin, you are right about the Does this also fix your initial issue? |
Awesome! Yes, that should fix the visual bug I was encountering. |
Cool! Good to hear :) So you think we can close this issue? Or shall we keep it around, to see if we need to further address the hooks firing? I still don't really think that it should fire the whole chain again, as the page is kept alive. So the only thing it should then do is ensure that the previously focused component, receives back it's focus, right? But happy to hear if we've missed a use case or angle. |
Yeah, I could go either way, but #163 seems to cover that for now. But yeah, we can go ahead and close this. |
I'm finding that if I have
keepAlive: true
on a route, navigate away from it, then navigate back, thefocus
hook does not fire on the page component. This means the proper child component on the page does not get refocused.The text was updated successfully, but these errors were encountered: