can only interact with a turbo frame once?
See original GitHub issueIt’s probably something silly, but I couldn’t figure it out yet…
The problem: After interacting with a specific turboframe, I cannot interact with it again.
First off: the server response does contain the correct turbo-frame-id 😃
Further details:
I have a simple form to inline edit the title of an item. It works on all items on the list perfectly. I click edit, update, click save, and the change is reflected. However if I try to do this another time on the same item, it just doesn’t do anything. No errors. If I edit another untouched item, it works fine.
When I inspect the element after updating, it still has the turbo-frame-id provided in the responses, but somehow also added src
which wasn’t returned by the server… I’m not sure if this is a potential clue?
See attached video that hope demonstrates this?
using: turbo-rails gem 0.5.9, turbo-rails 7.0.0-beta.5, rails 6.0 with webpacker 5.2.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:16 (1 by maintainers)
Top GitHub Comments
well, i came up with this solution for now
and i use it like so
this will reset the src only on form submits, and links will work as expected, for example clicking. a back button within the frame will work, but when a form submission completes, it resets the src.
The documentations says that POST should redirect, I’m not sure why GET should also use redirect ? My use case is to use GET request for showing in another frame
<turbo-frame id='modal'></turbo-frame> <turbo-frame target="modal"><a href='posts/1/edit'>Edit</a></turbo-frame>
. But OK, for now I’m using this hack to have redirection response