Open smridge opened 3 years ago
Would you mind testing with v7.0.0-beta.4 to see if the issue has been fixed?
GET
requests are good (as this triggers turbo:before-cache
) š . For POST
requests, the issue persists. Is there perhaps something different that should be done for POST
requests as this does not trigger turbo:before-cache
? I tried playing around with turbo:submit-start
, turbo:before-fetch-request
etc and no success unfortunately.
Form Field before submit:
<input data-behavior="datepicker" type="hidden" name="foo[referral_date]" id="foo_referral_date" class="flatpickr-input">
<input class=" form-control input" placeholder="" tabindex="0" type="text" readonly="readonly">
With Turbolinks ā :
<div class="field_with_errors">
<input data-behavior="datepicker" type="hidden" value="" name="foo[referral_date]" id="foo_referral_date" class="flatpickr-input">
<input class=" form-control input" placeholder="" tabindex="0" type="text" readonly="readonly">
</div>
With Turbo š :
<div class="field_with_errors">
<input data-behavior="datepicker" data-controller="flatpicker" type="text" value="" name="foo[referral_date]" id="foo_referral_date">
</div>
I'm having this same issue with Turbo 7.1.0.
In my situation adding <meta name="turbo-cache-control" content="no-cache">
is a good enough workaround and avoids the need to deconstruct any third-party widgets.
This does seem to be counter to what the docs say in the handbook.
Attempting to transition from Turbolinks to Turbo and coming across some differing behavior. I'm not overly familiar with this repo and full intent but curious on the
before-cache
behavior when switching from Turbolinks to Turbo.In some cases,
before-cache
is needed for certain elements to behave as expected when clicking the back button or form submission error redirects.With Turbolinks ā :
With Turbo:
Update: When going through various events
turbo:submit-start
did not work either.Is there a new approach to solving this? Thoughts from anyone?