-
Notifications
You must be signed in to change notification settings - Fork 429
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
Frame not updating a second time unless I manually clear src attribute #365
Comments
@WriterZephos this issue should be fixed already #360 Could you please provide a sample app with a reproducible bug? |
Yeah I will work on that. Might take me a day or two since this is purely a side project outside my day job. |
@kirillplatonov I got a demo app that demonstrates the issue I am having. Instructions to reproduce it are in the readme: https://github.com/WriterZephos/TurboBugDemo |
@kirillplatonov I took a look at the code example. It appears the issue is caused by nested turbo-frames. The following does not work <turbo-frame id="new_test_model" reloadable="">
<a data-turbo-frame="test_model_form" href="new">New</a>
<turbo-frame id="test_model_form" src="http://localhost:3000/test_models/new"></turbo-frame>
</turbo-frame> Moving the link outside the parent frame works <a data-turbo-frame="test_model_form" href="new">New</a>
<turbo-frame id="new_test_model" reloadable="">
<turbo-frame id="test_model_form" src="http://localhost:3000/test_models/new"></turbo-frame>
</turbo-frame> |
I was able to verify this. Thank you for taking a look at it! This does seem like a bug to me, however, since the frame loads the first time. I think anyone could reasonably expect it to work subsequently. |
I created an MR with just the failing test for this in #370, but I do not have a solution. It appears the recent MR #360 modified FrameRedirector#linkClickIntercepted. It appears this method applies to links outside a frame, but from what I can tell links inside a frame are handled by Framecontroller#linkClickIntercepted. |
I also discovered the |
Hi folks. Cudos to all the people building this thing. I think it bodes well for the future of software development.
I am having a similar issue to some others I have researched: #263, #360, #339, #349.
I have a link above an empty turbo-frame as so:
The response to the link is as so:
The issue is that if I click the cancel button to remove the div containing the form, the link can't load the form again because the src gets set on the turbo-frame. The request succeeds and the browser returns the html, but it doesn't update the frame. If I clear the src manually, then it works again.
I tried to use a stimulus controller to clear the src attribute in the
connect()
lifecycle callback, but it never actually calls it because the turbo-frame is there from the beginning and never actually get reloaded (just its contents, as originally intended). I have seen some other stimulus controllers that apparently do what I need, but they look overly complex for such a simple task (not a javascript guy, hence the appeal of hotwire/turbo).I am hoping there is an easy solution to this, but I am using
7.0.0-rc.3
which was supposed to have a fix to the similar issues I listed above, so I am at a loss and think there might be another facet to this bug that hasn't been fixed yet.The text was updated successfully, but these errors were encountered: