Closed ghost closed 9 years ago
This doesn't seem to be an issue with Turbolinks. Please ask on StackOverflow, or provide a test case to reproduce the issue.
I think is a problem with Turbolinks. Anyway, thanks. :dancers:
@ginolon your StackOverflow question no longer exists. Did you find a solution to your onclick problem? I'm also using Turbolinks.visit(link);
on row click and the GET request is being called twice.
UPDATE: my issue was with my own messy js, not Turbolinks.
I have the same issue. Turbolinks and remote forms work fine together as long as the remote form is not wrapped around a table row.
This only works, after refreshing the page. Otherwise no post is made.
[...]
%tr.course-day{ id: "course_day_#{course_day.id}" }
= simple_form_for course_day, remote: true do |f|
%td
= f.input_field :day, as: :date_picker, placeholder: "01.01.2000"
[...]
Update: It's already not working as long as the form is within a table.
I have these code:
In application.js:
In my template.html.erb I have:
If I remove from this
link_to
theremote: true
tag, the click can't get triggered and the click on tr makes no effect. Why?So I put this code in my application.js to make it works, but I think it is a mess:
HOW TO FIX?