push_redirect not working from sticky child liveview instead it seems to do a socket reconnection as per console

I’m creating a web app using Live View. Here’s the current layout of the app

  • Top navigation in live.html.heex
  • I have two nav links in Top navigation i.e. Projects, Settings.
  • Both above links need to show a sub menu (links with open / collapse / selected sub item link options - want to retain the state that’s why using sticky option) along with actual content (inner_content in project.html.heex). The sub links will do a push_redirect after saving the current selected link info in the submenu liveview.
  • I have created separate templates files for Top navigation links i.e. layouts/project.html.heex
  • I have created a sticky liveview (submenu) and included it in the project.html.heex file
  • For all of the projects related sub links, I’ve created separated liveviews (with template being project.html.heex having the sticky lv).

Whenever I click on any of the sub links, I trigger a handle_event “navigate” which assigns the selected link to socket, and then push_redirect to the link

The issue is that push_redirect is not working from sticky lv. As per console, it seems to do a reconnection of socket. No errors shown in console though

However, I’m able to use live_redirect from the sub menu heex of the lv and redirect successfully. But push_redirect is not working. Is there something that I am missing?

I saw some info that it may not be allowed from source code:

Not sure about the reason though